You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Oliver Zeigermann <ol...@gmail.com> on 2004/10/20 09:30:56 UTC
Timeout for store caches
Folks,
I have augmentd the store caches to support timeouts as well. You can
configure it in Domain.xml. Example:
<store name="memory">
<parameter name="cache-timeout">10</parameter>
<nodestore classname="org.apache.slide.store.mem.TransientNodeStore"/>
...
</store>
This would mean that all cache entries get invalid after 10 seconds.
Which might be useful when stores get changed from other sources than
Slide and you do not want to switch off global caches completely.
By default the timeout is infinite which means if you do not change
anything in Domain.xml Slide will behave in the same way as before.
Oliver
P.S.: James, just wondering, would this be useful for the JNDI user
store as well?
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Timeout for store caches
Posted by Oliver Zeigermann <ol...@gmail.com>.
On Wed, 20 Oct 2004 22:38:51 -0700, James Mason <ma...@apache.org> wrote:
> On Wed, 2004-10-20 at 00:30, Oliver Zeigermann wrote:
>
>
> > Folks,
> >
> > I have augmentd the store caches to support timeouts as well. You can
> > configure it in Domain.xml. Example:
> >
> > <store name="memory">
> > <parameter name="cache-timeout">10</parameter>
> > <nodestore classname="org.apache.slide.store.mem.TransientNodeStore"/>
> > ...
> > </store>
> >
> > This would mean that all cache entries get invalid after 10 seconds.
> > Which might be useful when stores get changed from other sources than
> > Slide and you do not want to switch off global caches completely.
> >
> > By default the timeout is infinite which means if you do not change
> > anything in Domain.xml Slide will behave in the same way as before.
> >
> > Oliver
> >
> > P.S.: James, just wondering, would this be useful for the JNDI user
> > store as well?
>
> I think so. The JNDIStore uses pre-emptive cache refreshing to shield
> users from slow queries, so there would need to be a way to put things
> into the cache from outside ExtendedStore. Also, ehcache is a bit more
> tuneable then just a single timeout value, but I doubt that's such a big
> deal.
Should be no problem to add methods to ExtendedStore for that purpose.
But if you want to stick to ehcache, no prolbem either :)
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Timeout for store caches
Posted by James Mason <ma...@apache.org>.
On Wed, 2004-10-20 at 00:30, Oliver Zeigermann wrote:
> Folks,
>
> I have augmentd the store caches to support timeouts as well. You can
> configure it in Domain.xml. Example:
>
> <store name="memory">
> <parameter name="cache-timeout">10</parameter>
> <nodestore classname="org.apache.slide.store.mem.TransientNodeStore"/>
> ...
> </store>
>
> This would mean that all cache entries get invalid after 10 seconds.
> Which might be useful when stores get changed from other sources than
> Slide and you do not want to switch off global caches completely.
>
> By default the timeout is infinite which means if you do not change
> anything in Domain.xml Slide will behave in the same way as before.
>
> Oliver
>
> P.S.: James, just wondering, would this be useful for the JNDI user
> store as well?
I think so. The JNDIStore uses pre-emptive cache refreshing to shield
users from slow queries, so there would need to be a way to put things
into the cache from outside ExtendedStore. Also, ehcache is a bit more
tuneable then just a single timeout value, but I doubt that's such a big
deal.
-James
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org