[opencms-dev] (mis)understanding Flex cache

Claus Priisholm cpr at codedroids.com
Mon Jan 28 17:37:11 CET 2008


I take it that you want the JSP use your imageId to decide what to 
return. If so, then you must the "params" cache directive for the JSP - 
i.e. params=(imageId).

Whether or not you need the "locale" cache depends on what it is you 
want to do, but if you include something like "locale,params=(imageId)" 
  then you'll potentially end up with a cached copy of output from the 
JSP for each of the possible locales times the number of imageIds 
requested.

Pere Torrodellas wrote:
> Hello,
>  
> I don't understand why Flex cache was not working as I understand it 
> should in the following case of a JSP. Am I completely wrong about how 
> this works?
>  
> 1. The JSP had property cache=locale only beacuse in case of error it 
> must redirect to a different page depending on language, otherwise I 
> would have defined cache=always.
>  
> 2. The JSP does this:
>     2.1 Find out locale from OpenCms
>     2.2 Get value of the "imageId" request parameter
>     2.3 Get image bytes with id = imageId from DB
>     2.4 Write image bytes to the response output.
>     2.5 If exception, redirect to page depending on locale
>  
> As far as I understand, this should work because the resulting 
> image depends only on the "imageId" request parameter, but users were 
> getting the same image all the time until I took the JSP out of the Flex 
> cache. Can someone explain why?
>  
> Thanks,
>  
> Pere
>  
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

-- 
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
-- 
Javadocs and other OpenCms stuff: 
http://www.codedroids.com/community/opencms



More information about the opencms-dev mailing list