gpt4 book ai didi

grails - 将全局缓存设置为false

转载 作者:行者123 更新时间:2023-12-02 15:56:40 25 4
gpt4 key购买 nike

在Grails 2.4.5 Controller 方法中使用cache false可以防止grails缓存响应。

想要在不使用此语句的情况下为所有方法默认设置此属性。那可能吗?

def loginHandshake = {
cache false

// do here the hard work
...
response.outputStream << "OK ${session.id}"
}

最佳答案

您可以在Config中进行定义:

cache.headers.enabled = false

从文档: https://grails.org/plugin/cache-headers

关于grails - 将全局缓存设置为false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33433849/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com