BigMemory Go 4.3.4 | Product Documentation | BigMemory Go Integrations | Using BigMemory Go with Spring | Spring 2.5 to 3.1
Spring 2.5 to 3.1
This open source, led by Eric Dalquist, predates the Spring 3.1 project. You can use it with earlier versions of Spring, or you can use it with 3.1.
As with Spring 3.1, it uses the @Cacheable annotation to cache a method. In this example, calls to findMessage are stored in a cache named "messageCache". The values are of type Message. The id for each entry is the id argument given.
@Cacheable(cacheName = "messageCache")
public Message findMessage(long id)
For cache invalidation, there is the @TriggersRemove annotation. In this example, cache.removeAll() is called after the method is invoked.
@TriggersRemove(cacheName = "messagesCache",
when = When.AFTER_METHOD_INVOCATION, removeAll = true)
public void addMessage(Message message)
See for a blog post explaining its use and providing further links.

Copyright © 2010 - 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release