I am not in details of the transformers, if I can follow the
discussion on this list some details were discussed very recently -
therefore I cannot say much here.

I would prefer something that spans the whole application.
It does not matter if it is a perUser or userIndependent cache - in
fact tit only depends on the key and how the key is constructed. If I
need it perUser then user would become a part of the key:
  String key = .... + userId;

My naive approach would be to have component that can be assigned some
key generator.
It could be done by adding overridable method
   public Serializable/String getCacheKey()

Additionally Wicket could define a cache service and some default
implementation that ignores all 'set' calls and returns null on all
'get' calls. It would be up to the user to provide some better impl.

   public interface ICacheService {
       public String/WhateverNeeded getObject(key)
       public void setObject(key, value);
       public boolean containsKey(key);
       public void clear();
   }

If the key returned by the component is null - the default behaviour -
then there is no caching involved at all, otherwise the component asks
the application for cache service and tries to get value for the key.
If not null - render the component and store results in the cache,
otherwise use the cached value.

Things like cache configuration/capacity/flushRules and detailed
behaviour would depend on the actual cache service implementation. If
needed - somebody just sets the real cache implementation to the
Application.

Darek

On 02/01/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> Not out of box yet, but I don't think it is difficult to implement
> based on the recently committed "transformers". Currently only a XSLT
> and a noop transformer is available but the idea would be the same.
> You just wouldn't transform the output generated by the component but
> store them in a cache and restore it when needed. The cache key could
> be anything from the component object, its id or path. All children
> would have to me marked rendered though in order to avoid an
> exception.
> Tranformers are available as Container and Behaviours.
> Q. Should the cache span the whole application because the panel you
> want to cache is used on multiple pages? Will the panel/list be the
> same for all users?
> Q: what would be the best cache key?
>
> Juergen
N�HY޵隊X���'���u���[�������
ަ�k��!���W�~�鮆�zk��C� [EMAIL PROTECTED],����a{���,�H��4�m���i�(��ܢo�v'

Reply via email to