commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robertlazarski ." <>
Subject Re: [jcs] Migrating from Ehcache to JCS, need help getting the right config
Date Thu, 23 Mar 2017 14:01:13 GMT
Thanks for the response! That helped a lot. I am about to start coding
but I am trying to figure out #3. Please see below.

On Wed, Mar 22, 2017 at 2:44 PM, Thomas Vandahl <> wrote:
>> 3) Most importantly, on server startup we need the entire disk
>> persisted cache loaded into memory, i.e. "cache warming" . I am
>> wondering if the CacheLoaderAdapter is the right class for this?
>> Currently we use a class that Ehcache calls on startup that just uses
>> an Iterator over all the cache Elements, effectively loading
>> everything into memory.
> This can be achieved by setting ClearDiskOnStartup=false. This happens
> to be the default. JCS will load all the keys into memory then but not
> the values. So if you want the values to be loaded, just modify the
> class you used for EHCache.
> How to integrate this into your application depends on your application
> lifecycle. There is no CacheLoaderAdapter class in JCS. If you tell me a
> bit more about your application, I might be able to give you a hint.
> Bye, Thomas

The CacheLoaderAdapter class I referred to as it turns out is for
JCache and its in the JCS extras module.

The reason I was interested in this is because with ehcache I define
bootstrapCacheLoaderFactory=myStartUpClass that ehcache calls on
server init / ehcache init, as my class extends the ehcache
MemoryLimitedCacheLoader class to load the entire cache (keys and
values) into memory.

I am just looking for some way to do the equivalent with JCS - call
something on server init and perhaps tied in to JCS init. That led me
into JCache. Anyways we have a simple local cache I am trying to just
get JCS to somehow get my cache into memory on startup and then go
from there.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message