jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sambasiva Reddy" <sambasivaredd...@gmail.com>
Subject Re: Help for cache.ccf file
Date Wed, 08 Nov 2006 12:07:31 GMT
re-create means i passed same object(string) to get() method.

like get(key);

On 11/8/06, Ard Schrijvers <a.schrijvers@hippo.nl> wrote:
>
> >
> > i did debugging that cache.put() is returning null. i don't have idea
> > about configure() method
> > is it useful for what purpose??   when i checked isPresent() metod.but
> > it is showing false.
> >
> > 1st run:
> > load(key),cache.put(key,object),cache.get(key) working properly.
> >
> > 2nd run:
> > cache.get(key) returning null value. and isPresent() showing false.
>
> Do you re-create the key object?
>
> It might be that your key object does not have the proper equals and hashCode implementation.
>
> Suppose, your key is an instanceof YourCacheKey. Now, if your YourCacheKey does not override
the default equals and hashcode from Object, your key object in the second run won't be found
if it is a new key
>
> Ard
>
> >
> > Thanks & Regards,
> > Sambasiva Reddy,
> > CTS
> >
> >
> >
> >
> > On 11/8/06, Ard Schrijvers <a.schrijvers@hippo.nl> wrote:
> > >
> > > > Hi,
> > > > if i run program, cache manager is instantiating and
> > putting,getting
> > > > objects from/to is working.
> > > >
> > > > when i run again that objects not retrieving from jcs using
> > > > get() method.
> > >
> > > You are talking about different JVM runs? I do not know if
> > your cache is re-populated at the next run. I do not know if
> > this is configurable (flush the cache to disk at shutdown).
> > Anyway, do some debugging in the next run, like getting the
> > number of items in the cache. Probably, it is just empty when
> > running again.
> > >
> > > Ard
> > >
> > > >
> > > > can u tell me.
> > > >
> > > > On 11/8/06, Ard Schrijvers <a.schrijvers@hippo.nl> wrote:
> > > > > very basic one, but as Denis is pointing out, you have
> > > > *many* examples in svn:
> > > > >
> > > > > jcs.default=DC
> > > > >
> > > > jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCac
> > > > heAttributes
> > > > > jcs.default.cacheattributes.MaxObjects=100
> > > > >
> > > > jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.eng
> > > > ine.memory.lru.LRUMemoryCache
> > > > >
> > > > > ##### AUXILIARY CACHES
> > > > >
> > > > > # Indexed Disk Cache
> > > > >
> > > > jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.Indexed
> > > > DiskCacheFactory
> > > > >
> > > > jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.inde
> > > > xed.IndexedDiskCacheAttributes
> > > > > #jcs.auxiliary.DC.attributes.DiskPath=
> > > > >
> > > > > # PRE-DEFINED CACHE REGIONS
> > > > >
> > > > > jcs.region.main=DC
> > > > >
> > > > jcs.region.main.cacheattributes=org.apache.jcs.engine.Composit
> > > > eCacheAttributes
> > > > > jcs.region.main.cacheattributes.MaxObjects=100
> > > > >
> > > > jcs.region.main.cacheattributes.MemoryCacheName=org.apache.jcs
> > > > .engine.memory.lru.LRUMemoryCache
> > > > > jcs.region.main.cacheattributes.UseMemoryShrinker=true
> > > > > jcs.region.main.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> > > > > jcs.region.main.cacheattributes.ShrinkerIntervalSeconds=60
> > > > >
> > > > > Regards Ard
> > > > >
> > > > > >
> > > > > > Hi,
> > > > > > i need cache.ccf file for disk caching configuration.
> > > > > >
> > > > > > Thanks&regards
> > > > > > Sambasiva Reddy
> > > > > > CTS
> > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > jcs-users-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > jcs-users-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-users-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message