Well, i've looked a bit into it and it turns out that this will not work.

Im trying to cache pages that *could* be statefull the only way to make a rule for this are that the current page that links cachable pages do it by giving a special url like "/cachable/mypage". If I try the header approach the page would have to render first..


This must be possible somehow with wicket?

Nino Saturnino Martinez Vazquez Wael wrote:
I talked a bit on IRC on this. And got suggested to use headers instead. So this might be a viable option and much much simpler! I'll look into it and see how it works out.

Nino Saturnino Martinez Vazquez Wael wrote:
Hi

I've been fighting a bit with making a EncodingStrategy that can prepend a keyword (cacheable etc) to the url depending on page state, however I cant get the last bits to work heres what I got so far:


ApplicationClass:
   @Override
   protected IRequestCycleProcessor newRequestCycleProcessor() {
       return new WebRequestCycleProcessor() {
           protected IRequestCodingStrategy newRequestCodingStrategy() {
               return new PrependKeywordEncodingStrategy(
                       new WebRequestCodingStrategy(), "cacheable");
           }
       };
   }

I've posted the prepending strategy to pastebin:

http://pastebin.ca/1173557


So the idea are basically that there should be prepended "cacheable" to all pages where the user are not logged in. That way I can set my apache up to cache all pages with /cacheable prefix.




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to