Managing ehcache through Spring

There does not appear to be any documentation in the Spring manual about setting up an ehcache cache in your Spring container. There is a Spring bean built in to do it. To set it up with the default configuration, all that is needed is a line like this:

<bean id=”mediaCache” class=”org.springframework.cache.ehcache.EhCacheFactoryBean”/>

It looks like you can also customize quite a bit of the config without providing an ehcache.xml file. That could be nice so you don’t have to go chasing around to find all of the settings.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s