[jboss-as7-dev] A simple timed cache?

Jason T. Greene jason.greene at redhat.com
Tue Sep 6 09:38:40 EDT 2011


On 9/6/11 8:32 AM, Sanne Grinovero wrote:
> On 6 September 2011 03:05, Jason Greene<jgreene at redhat.com>  wrote:
>> Two options:
>>
>> 1) CHM + Reaper thread (we have something like this in msc)
>>
>> 2) copy infinispan's LIRS map
>
> Infinispan's LIRS is not easy to extract out, you'll have to make
> significant changes

Last I looked it was a small handful of classes. Not a big deal. I think 
Jesper used it in ironjacamar. The security subsytem directly linked 
against it. That' something I have been meaning to open a JIRA on, since 
this is technically not a public API it's likely better to copy.

> ; maybe you could depend on Infinispan core?

We could have things directly link to the impl, but the above concerns 
apply. We can't directly use Infinispan though because even in local 
mode it adds too much time to boot.

> Depending on your needs it might not suite you: LIRS provides a
> bounded container, so it might drop some values even if the timeout
> was not reached.

Yeah there is also a real LRU impl too.

-- 
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat


More information about the jboss-as7-dev mailing list