cancel
Showing results for 
Search instead for 
Did you mean: 

Webscript response cache not expires

alessandro_orig
Champ in-the-making
Champ in-the-making
I have redefined the ContentGet.java class which return the document downloaded, this class extends AbstractWebscript
What i have to do is to set expiration for the cache but it seems to not work, the document is cached and the cache does not expire, any idea?

         Cache cache = new Cache();
         cache.setNeverCache(false);
         cache.setMustRevalidate(true);
         //cache.setETag("\"" + Long.toString(modified.getTime()) + "\"");
         cache.setLastModified(modified);
         cache.setMaxAge(Long.parseLong("1440"));
         webscriptRes.setCache(cache);
         res.setContentType(MimetypeMap.MIMETYPE_FLASH);
         FileCopyUtils.copy(convertedfile, res.getOutputStream());
1 REPLY 1

kevinr
Star Contributor
Star Contributor
Have you tried looking at the response headers in FireBug/Fiddler or similar tool to check that the HTTP headers are what you expect…?