Adding Declarative Caching to your App with Spring 2.0

For certain types of data (frequently accessed, but infrequently changed), caching is an easy approach to improving performance by minimizing database roundtrips.

BEA’s dev2dev site have an interesing article on how to use declarative caching. With this approach using Spring, methods in which you want to take advantage of caching can be declared and wired up to the Caching provider in the Spring Application Context file, instead of having to hard-code the access to the Cache API within your code, which would make the code harder to follow, maintain, and would tie you to a particular cache provider.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.