There's a discussion on the JIRA whether or not to make the localizer cache in development mode, but just for reference (and for other people searching for localizer and cache), Juergen showed me how to get what I want by adding the following code in the init() method of my application:

  if (!isDeployment()) {
    getResourceSettings().setLocalizer(new Localizer() {
      @Override
        protected void putIntoCache(String cacheKey, String string) {
          // Do not cache.
        }
    });
  }

where isDeployment() returns whether your application is in deployment mode or not.

Regards,
Sebastiaan

Sebastiaan van Erk wrote:
Ok, I created a JIRA for this:
https://issues.apache.org/jira/browse/WICKET-1128

Regards,
Sebastiaan

Eelco Hillenius wrote:
Best to open a proper feature request for this in JIRA.

Eelco

On 11/4/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
Hi,

I was wondering if I could somehow turn off caching of the localizer in
development mode (from the current source it doesn't look like it).

The reason I ask is because now the cache is only flushed if a resource
that is being watched is changed. However:

* if you add a new properties file for a page or component after you
already rendered the page once the cache is not cleared and it keeps
finding the key=null entry in the cache.

* if you add your own database string resource loader, the cache is
never flushed at all.

I know I can add a link to flush the localizer cache if and only if
we're in development mode, but I think a Settings options could be nice
to just turn off caching (my laptop is fast enough, I really don't care
if it tries to resolve all the labels all the time).

Regards,
Sebastiaan



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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to