BigMemory 4.3.10 | Product Documentation | BigMemory Max Integrations | Using BigMemory Max with Spring | Using Spring 3.1
 
Using Spring 3.1
BigMemory Max's Ehcache supports Spring integration. Spring 3.1 includes an Ehcache implementation. See the Spring 3.1 JavaDoc.
Spring Framework 3.1 has a generic cache abstraction for transparently applying caching to Spring applications. It has caching support for classes and methods using two annotations:
@Cacheable
Cache a method call. In the following example, the value is the return type, a Manual. The key is extracted from the ISBN argument using the id.
@Cacheable(value="manual", key="#isbn.id")
public Manual findManual(ISBN isbn, boolean checkWarehouse)
@CacheEvict
Clears the cache when called.
@CacheEvict(value = "manuals", allEntries=true)
public void loadManuals(InputStream batch)