Hey,
So, I have two methods:
@Cacheable(cacheName = "foobar",
keyGenerator = @KeyGenerator(name = "HashCodeKeyGenerator",
properties = @Property(name = "includeMethod", value = "false")))
public List<Foobar> getFoobars(int foobarId){
return dao.getFoobars(foobarId);
}
@TriggersRemove(cacheName = "foobar",
keyGenerator = @KeyGenerator(name = "HashCodeKeyGenerator",
properties = @Property(name = "includeMethod", value = "false")))
public Foobar deleteFoobar(Foobar foobar){
dao.delete(foobar);
return foobar;
}
When a Foobar is deleted, I want to remove all List<Foobar> objects that contain it from the cache.
How can I accomplish this with annotations or ehcache methods?
Thanks,
- James