bsed / ehcache-spring-annotations

Automatically exported from code.google.com/p/ehcache-spring-annotations
0 stars 0 forks source link

@Cacheable refresh not working #91

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create cache with 
@Cacheable(cacheName="somecache",decoratedCacheType=DecoratedCacheType.REFRESHIN
G_SELF_POPULATING_CACHE,refreshInterval=1000*60) above a method
2.cache is created on first call
3.Cache never refresh

What is the expected output? What do you see instead?
Updated cache value should come after refreshInterval

What version of the product are you using? On what operating system?
ehcache-spring-annotations 1.2.0, spring 3.0.3.RELEASE, windows 7

Please provide any additional information below.
code in issue 55 patch not found in ehcache-spring-annotations 1.2.0

Original issue reported on code.google.com by pati...@gmail.com on 29 Nov 2011 at 11:16

GoogleCodeExporter commented 9 years ago
Did you found a solution for this issue?

We're able to use this feature with ehcache-spring-annotations 1.2.0, Spring 
3.0.5.RELEASE and ehcache-core 2.4.7.

What debug output do you get from the classes SelfPopulatingCache and 
RefreshingSelfPopulatingCache?

These classes should log in debug mode soemthing along the line of the 
following example log output:

17:31:18.293 [ZielgruppeRepository Cache Refresh Timer] DEBUG 
n.s.e.c.blocking.SelfPopulatingCache - ZielgruppeRepository: found 1 keys to 
refresh
17:31:18.293 [ZielgruppeRepository Cache Refresh Timer] DEBUG 
c.g.e.a.RefreshingSelfPopulatingCache - Element for key 417967725599 is only 
2015ms old and will not be refreshed. Refresh age is 3000

/Torsten

Original comment by torsten....@gmail.com on 23 Jan 2012 at 11:51

GoogleCodeExporter commented 9 years ago
Thanks Torsten,
It worked for me.

I have one more doubt refreshInterval takes final value. Is there any way as I 
want to read interval value from properties file. Currently I am doing this by 
custom implementation of 'createEntry' in 'CacheEntryFactory'

Shitalkumar

Original comment by pati...@gmail.com on 18 Feb 2012 at 2:48