java - How to renew or invalidate cache using SimpleCachingPageFilter in Ehcache? -


we using web-ehcache's net.sf.ehcache.constructs.web.filter.simplepagecachingfilter, configured xml, cache page json message, message can changed administrator. how invalidate cache when administrator changes changes json message?

i figured out how make it:

cachemanager.getinstance().getehcache("cachename").removeall(); 

it gets singletone cachemanager, gets ehcache depending on name of cache, removes elements.

in next request cached page, filter looks ehcache, finds, without elementx , updates elements!


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -