From: Jan Haderka 
<[email protected]<mailto:[email protected]>>
Reply-To: Magnolia User-List 
<[email protected]<mailto:[email protected]>>
Date: Fri, 21 Jan 2011 02:04:06 -0600
To: Magnolia User-List 
<[email protected]<mailto:[email protected]>>
Subject: Re: [magnolia-user] Caching servlet response


On Jan 21, 2011, at 1:04 AM, Rakesh Vidyadharan wrote:

Would you be able/willing to publish some statistical info about the deployment 
(number of nodes, size of the repo, responsivity, number of users, memory 
usage, etc.)? It's totally unrelated to your question, just for personal 
interest, seems like an interesting deployment you have there.


The latest counts are roughly:

Book titles = 12000 (each book can have up to 4 distributions/isbns with 
additional properties as child nodes)
Authors = 13000
Other nodes such as categories, publishers etc = 1000

Documents->images = 13000
Documents->html pages = 1000 – we need to preserve some custom html pages from 
our current site, so just uploading to dms and serving out seemed the easiest 
approach.

Overall on disk the repository is a little over 2 gig.

We are running with 2G heap for each instance – author and two public instances.
The site is currently running fine, we are not yet in production so we do not 
have any performance metrics yet.  We will be performing jmeter testing, but 
not yet.  We anticipate only around 60,000 pages requests a day.


We would like to hide the destination html page from the browser (eg. 
/books/bookDetail.html?path=/books/book/chicago/A/bo123456) with just the node 
path url (eg. /ucp/books/book/chicago/A/bo123456.html which is what all links 
in our site look like).

VirtualURIMapping can do this for you as well.

This is what I am trying to move away from.  We do not want the node path to 
redirect to /books/bookDetail.html?xxx, although bookDetail.html will be 
rendering the page.


This itself was trivial, I just created a servlet that was mapped to 
/ucp/books/book and all it did was forward the request to the 
bookDetail.html?path=<nodePath> and everything worked as expected.  The only 
issue with this approach is that the output from the servlet does not seem to 
be cached (I verified by logging from the model class backing the template).

So, the question is, how can I go about getting the servlet response to be 
cached in the magnolia cache?

By default Magnolia doesn't cache dynamic pages (those with the params). You 
can change this in 
config:/modules/cache/config/configurations/default/cachePolicy/voters/deny/parameters.
 Just disable or remove this voter (or replace it with something more complex 
that would disable caching just for some request with parameters).

HTH,
Jan

I had already modified that, which is why accessing /books/bookDetail.html?xxx 
was getting cached.  I did not delete it, but set enabled to false and it is 
working.  However, I wonder why the forwarded request is not being cached, 
since that would be as good as caching the response from the servlet.

Rakesh


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to