Announcement Announcement Module
Collapse
No announcement yet.
HTTP caching Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP caching

    Hi,
    I have to set cache headers on some of the responses i.e some resources can be cached for 1 hour, some for a week or some should not be cached at all and some resources can use etags.

    If I add this in my spring config, all response have a caching seconds of 100 which is not what I want.
    Code:
    <mvc:interceptors>
        <bean id="webContentInterceptor" class="org.springframework.web.servlet.mvc.WebContentInterceptor">
            <property name="cacheSeconds" value="100"/>
            <property name="useExpiresHeader" value="true"/>
            <property name="useCacheControlHeader" value="true"/>
            <property name="useCacheControlNoStore" value="true"/>
        </bean>
    </mvc:interceptors>
    Any easy way in spring where the caching mechanisms are different for different resources?
Working...
X