Eelco Hillenius wrote:
I don't remember the details from the top of my head, but there should
be an example at Wicket examples that shows you how to effectively
disable caching.

Yes I found the customresourceloading example and I am doing what it says....but it gets into a loop and keeps calling my

"This example loads the custom template just once, though it may reload when resource polling is turned on and the template changes. If you want a load the template every time a page (or panel) is requested, you can additionally let your container implement IMarkupCacheKeyProvider, and then return null in the implementation of getCacheKey; Wicket will not cache templates without a cache key. This functionality can be used to e.g. when you want to load templates from a database, and you know that the actual templates can be different from request to request."

Here's is what I am doing....and it doesn't work the call getMarkupResourceStream happens over and over and over again....


public class QueryDialogPage
   extends
       VariationPage
   implements
       IMarkupResourceStreamProvider,
       IMarkupCacheKeyProvider
{
public QueryDialogPage( final PageParameters parameters )
   {
       super( parameters );

       ( method call to add components to page )
   }

@Override public IResourceStream getMarkupResourceStream( final MarkupContainer container, final Class containerClass )
   {
String markup = call to method to get the markup string ( creates it on the fly based on some xml )

           return new StringResourceStream( new StringBuffer( markup ) );
   }
public String getCacheKey( MarkupContainer container, Class containerClass )
   {
       return null;
   }


}


Eelco

On Sun, Mar 15, 2009 at 4:00 PM, Karen Schaper <[email protected]> wrote:
Hi All,

I have a wicket class that extends from WebPage and implements
      IMarkupResourceStreamProvider,
      IMarkupCacheKeyProvider

I am now using wicket 1.4rc2.


I DO NOT want the markup cached.  The page actually creates a variety of
markup so it can be different each time.

From what I've read if the I return null in the method getCacheKey, the
markup will not be cached.

However when I do this I get into a never ending loop of calls to get the
markup.

Is this a bug?  Is there any way to not have the markup be cached?

Any thoughts or hints on this would be greatly appreciated.

Thanks

Karen

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to