[英]how to disable tomcat caching?
how to disable tomcat caching? 如何禁用tomcat缓存? I use this -
我用这个 -
<Context antiJARLocking="true" antiResourceLocking="true" cachingAllowed="false" cacheMaxSize ="0" cacheTTL="1">
in Tomcat/conf/context.xml 在Tomcat / conf / context.xml中
but it not helps 但它没有帮助
Actual problem is antiResourceLocking="true"
. 实际问题是
antiResourceLocking="true"
。
Looks like there is a conflict with cachingAllowed="false"
. 看起来与
cachingAllowed="false"
存在冲突。
I'm not sure what you're using, but in context.xml you can change the value of cachingAllowed
by removing the flag. 我不确定你在使用什么,但是在context.xml中你可以通过删除标志来改变
cachingAllowed
的值。
Remember to delete the cache folder after that. 请记住在此之后删除缓存文件夹。
Resources : 资源:
On the same topic : 在同一主题上:
cachingAllowed did not help. cachingAllowed没有帮助。 I resolved this by modifying :
我通过修改:
$CATALINA_HOME/conf/Catalina/localhost/thewebapp.xml
which is the cached file of context.xml 这是context.xml的缓存文件
Put below code in your sever.xml file. 将以下代码放在您的sever.xml文件中。
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="false"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true"
reloadable="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
Make sure to delete all data from /work/Catalina/localhost directory before restarting tomcat. 确保在重新启动tomcat之前删除/ work / Catalina / localhost目录中的所有数据。 Also clear your browser cache.
同时清除浏览器缓存。
Its a good practice to disable browser caching while your app is in development. 在应用程序处于开发阶段时禁用浏览器缓存是一种很好的做法。 This post may help Disabling Chrome cache for website development
这篇文章可能有助于禁用Chrome缓存以进行网站开发
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.