AnsweredAssumed Answered

Webscript response cache not expires

Question asked by alessandro.origgi on Jul 21, 2009
Latest reply on Dec 8, 2010 by kevinr
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());

Outcomes