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

> We have lots of nodes in our own workspace (books, authors, etc.), and we 
> have common templates with their associated web page (eg. bookDetail.html, 
> authorDetail.html) that takes a path parameter and then displays the 
> appropriate content for the specified node.

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.

> 
> 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 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

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




----------------------------------------------------------------
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