ismorodin / ehcache-spring-annotations

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

@Cacheable should support preload feature when cached method has no parameter (so no cache key) #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When annotation is used we end-up with localized configuration around the 
method generating the data to be cached. It would be useful that the same 
annotation allow to specify that we want the method to be preload.

Preload is useful when the generation of the data is way to big for the first 
caller acceptable response time.

Original issue reported on code.google.com by sebtar...@gmail.com on 6 Sep 2011 at 2:56

GoogleCodeExporter commented 9 years ago
How would the library know the parameters to use for invoking the method? A 
feature like this is out the of the scope of an on-demand caching annotation.

Original comment by eric.dalquist on 6 Sep 2011 at 9:37

GoogleCodeExporter commented 9 years ago
Like the title said this is for cached methods having no parameter.

Method having parameters can be handled by adding private method without 
parameter that will call the parameterized method with the correct parameter 
while marked with preload.

Original comment by sebtar...@gmail.com on 6 Sep 2011 at 10:27