Yves Zoundi wrote:
THE SOLUTION
 The issue with the i18ntransformer is that generated cache keys are not
unique. A simple solution which might not be the best is:
...
public class I18nTransformerFix extends I18nTransformer { public Serializable getKey() {
        StringBuffer buff = new StringBuffer();
        buff.append("" + System.currentTimeMillis());
        buff.append("_");
        buff.append(super.getKey());
        return buff.toString();
    }
}

Whoa... using the current time in the cache key pretty much guarantees that two calls of getKey() will never return the same value, and therefore you'll never get a cache hit. This renders caching completely useless, it's just as if the I18nTransformer were not cacheable at all!

I still don't see why you're having problems to begin with. As long as the locale is correctly used to build the cache key everything should be fine and dandy. If something's going wrong with that then I think a real fix needs to be found rather than adding extra junk to the cache key.

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

Reply via email to