spring - Refresh cache triggered by changes in database is it possible? -
in application i'm using spring, hibernate , ehcache. problem database being modifiy application.
is possible, there implemented solution refresh cache based on database changes? can use additional column versioning etc.
any ideas?
what looking know read-write through
caching. ehcache supports it.
from ehcache documentation:
write-through caching caching pattern writes cache cause writes underlying resource. cache acts facade underlying resource. pattern, makes sense read through cache too. write-behind caching uses same client api; however, write happens asynchronously. ehcache-2.0 introduced write-through , write-behind caching. while file systems or web-service clients can underlie facade of write-through cache, common underlying resource database.
here detailed article: http://www.ehcache.org/documentation/2.8/apis/write-through-caching.html#write-through-and-write-behind-caching-with-the-cachewriter-
Comments
Post a Comment