qianjava / ehcache-spring-annotations

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

Cache objects during store #68

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to see a feature which allows objects to be put into the cache 
when being stored, for instance by caching the argument as opposed to the 
return type. 

E.g.,: 

    // Cache the argument, here entity
    @Cacheable(targetElement = TargetElement.Argument);
    public void store(Entity e);

    // Cache the returned object (default behaviour)
    @Cacheable(targetElement = TargetElement.ReturnedObject); 
    public Entity getEntity(String key);

This way we can put the stored objects directly in the cache to allow them to 
be picked up by any get routines sharing the same cache. 

Original issue reported on code.google.com by johan.sj...@gmail.com on 10 Mar 2011 at 2:04

GoogleCodeExporter commented 8 years ago

Original comment by eric.dalquist on 19 Apr 2011 at 10:46

GoogleCodeExporter commented 8 years ago

Original comment by eric.dalquist on 20 Sep 2011 at 2:58