Reputation: 30698
I am trying to make my web application faster by using caching of web pages for faster access next time so can anyone provide me guideline how to use Ehcache for the same?
Upvotes: 3
Views: 4816
Reputation: 10750
The Ehcache documentation on web caching should be a good start. For a quick start they also have a code sample / recipe on that.
EDIT: (how to see if it's working)
net.sf.ehcache.constructs.web.filter
(e.g. DEBUG
level) and look at the log entriesSimplePageCachingFilter
is gzipping the response; look for Content-Encoding: gzip
in HTTP response headers - Content-Length
should be smaller than beforeehcache.xml
: configure cache to overflowToDisk="true"
and set <diskStore path="target/ehcache-diskStore"/>
- a (at first empty) file named SimplePageCachingFilter.data
should have been created thereUpvotes: 1