服务器端,客户端缓存都设置为没有缓存
<bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"> <property name="requestContextAttribute" value="rc"/> <property name="cache"> <value>false</value> </property> <property name="suffix"> <value>.html</value> </property> <property name="exposeSpringMacroHelpers" value="true"/> <property name="contentType"> <value>text/html; charset=UTF-8</value> </property> </bean> <bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"> <property name="templateLoaderPaths"> <list> <value>/ftl/</value> <value>classpath:/ftl/</value> </list> </property> <property name="freemarkerSettings"> <props> <prop key="locale">zh_CN</prop> <prop key="defaultEncoding">UTF-8</prop> <prop key="date_format">yyyy-MM-dd</prop> <prop key="time_format">HH:mm:ss</prop> <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop> <prop key="number_format">0.################</prop> <prop key="template_update_delay">0</prop> </props> </property> </bean>
如上:
<property name="cache">
<value>false</value>
</property>
<prop key="template_update_delay">0</prop>
问题:
当访问的url返回500时,修改页面后继续访问,竟然不走后台了。重复检查多次,清空服务器及浏览器缓存也不行
最后发现是squid缓存了错误页面
http://blog.csdn.net/joliny/article/details/3355173
解决方案:
1.禁掉squid
2.禁止squid后重启(squid.conf)
acl NCACHE method GET
no_cache deny NCACHE