permaculture playing cards*
The moose likes EhCache and the fly likes Spring ehcache null value caching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Caching » EhCache
Bookmark "Spring ehcache null value caching" Watch "Spring ehcache null value caching" New topic
Author

Spring ehcache null value caching

Saritha Penumudi
Ranch Hand

Joined: Aug 18, 2003
Posts: 147
Hi,

I do not want null values to be cached. by default ehcache caches even null values. I am using spring gooogle ehcache annotations.
I could not find in any documentation on how I can configure to say "do not cache null values"

any help is greatly appreciated.

Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Saritha Penumudi wrote:Hi,

I do not want null values to be cached. by default ehcache caches even null values. I am using spring gooogle ehcache annotations.
I could not find in any documentation on how I can configure to say "do not cache null values"

any help is greatly appreciated.

Thanks


This is unrelated to Spring. You have to look at the ehcache documentation. Although, I was never away of null values in the cache. What are null?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Saritha Penumudi
Ranch Hand

Joined: Aug 18, 2003
Posts: 147
Thanks for the response. I did find any another place to post my question. I figured as I am using spring google code ehcache annotations, there could be some configuration in spring-ehcache configuration where I can say "do not cache null values".

I found the solution. There is an attribute in @cacheable called cachenull. When set to false it will not cache null values. Found solution from issues list of the googlecode spring ehcache project.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Saritha Penumudi wrote:Thanks for the response. I did find any another place to post my question. I figured as I am using spring google code ehcache annotations, there could be some configuration in spring-ehcache configuration where I can say "do not cache null values".

I found the solution. There is an attribute in @cacheable called cachenull. When set to false it will not cache null values. Found solution from issues list of the googlecode spring ehcache project.


Good job.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring ehcache null value caching
 
Similar Threads
Spring and EHCache
spring ehcache
Deployment error NoClassDefFoundError: org.hibernate.cfg.Configuration on Oracle 11g App Server
How to start a daemon thread at application startup in a Spring application
Hibernate cache issues