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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.DEBUGlevel) and look at the log entriesSimplePageCachingFilteris gzipping the response; look forContent-Encoding: gzipin HTTP response headers –Content-Lengthshould be smaller than beforeehcache.xml: configure cache tooverflowToDisk="true"and set<diskStore path="target/ehcache-diskStore"/>– a (at first empty) file namedSimplePageCachingFilter.datashould have been created there