squid cache configuration

springmvc+freemarker realizes web access

server side, client cache is set to no cache
<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>	



As above:
<property name="cache">
<value>false</value>
</property>

<prop key="template_update_delay">0</prop>


Problem:
When the visited url returns 500, continue to visit after modifying the page , did not even go backstage. Repeated checks for many times, and clearing the server and browser cache does not
work. Finally, I found that Squid cached the error page
http://blog.csdn.net/joliny/article/details/3355173Solution


:
1. Ban Squid

2. Ban Squid After reboot (squid.conf)

acl NCACHE method GET
no_cache deny NCACHE

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326071488&siteId=291194637