jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrique Rodríguez Lasterra" <laste...@javahispano.org>
Subject Re: null values/hasKey??
Date Mon, 25 Sep 2006 21:56:33 GMT
One problem with the workarund is that stats will be wrong, becouse if
i waat to check if one key exists, i have to call to
cacheaccess.get(key), and this will add one point to the stats
hitCount/missCountNotFound.

Regards, enrique.

2006/9/25, Enrique Rodríguez Lasterra <lasterra@javahispano.org>:
> Hi al, thanks for the workaround, is a good idea, but i think that a
> cache should have null values.
>
> Regards, Enrique.
>
> 2006/9/25, Al Forbes <forbes.al@googlemail.com>:
> > Hi,
> >
> > I can't remember where it was written, but you cannot add null to the cache.
> >
> > Best is to create an empty object of some type and check this object, or a
> > field in an object. This should be in the FAQ as I'm sure many people have
> > hit the same issue.
> >
> > Regards
> > Al
> >
> > On 25/09/06, Enrique Rodríguez Lasterra <lasterra@javahispano.org> wrote:
> > >
> > > Hi all, maybe this is an stupid question, but i'm starting with JCS.
> > >
> > > I want to put null values in the cache, and then ask if the key exist or
> > > not.
> > >
> > > cacheAccess.put("key",null);
> > > cacheAccess.get("key")==null
> > > cacheAccess.get("non-existence-key")==null
> > >
> > > is there any way to know if one key exists? Somthing like
> > > cacheAccess.hasKey("key)::boolean
> > >
> > > Regards, Enrique.
> > >
> > > --
> > > _______________________________
> > > Enrique Rodriguez Lasterra
> > > lasterra AT javahispano DOT org
> > > http://www.javahispano.org
> > > Asociación sin ánimo de lucro sobre java
> > > Spanish non profit association about java
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> > >
> > >
> >
> >
>
>
> --
> _______________________________
> Enrique Rodriguez Lasterra
> lasterra AT javahispano DOT org
> http://www.javahispano.org
> Asociación sin ánimo de lucro sobre java
> Spanish non profit association about java
>


-- 
_______________________________
Enrique Rodriguez Lasterra
lasterra AT javahispano DOT org
http://www.javahispano.org
Asociación sin ánimo de lucro sobre java
Spanish non profit association about java

---------------------------------------------------------------------
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