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
Original issue reported on code.google.com by
johan.sj...@gmail.com
on 10 Mar 2011 at 2:04