On 21/01/2011 05:27, "Grégory Joseph" <[email protected]>
wrote:

>
>
>On 21 Jan 2011, at 09:04, Jan Haderka wrote:
>> On Jan 21, 2011, at 1:04 AM, Rakesh Vidyadharan wrote:
>>> 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). 
>
>But the urls pointing to Rakesh's servlet have to parameters, the servlet
>only forwards to the regular page, adding said param. Essentially,
>indeed, doing exactly what VirtualURIMappings do.
>
>So Rakesh, whether you use a custom servlet or decide to use
>VirtualURIMappings, your content *should* be cached; can you confirm
>requests to your servlet have no parameters at all ?
>
>-g


Yes, the servlet does not have any parameters.  I had already disabled the
rule to not cache pages with parameters in configuration, so going
directly to bookDetail.html?xxx does get cached.

I do not understand the VirtualURIMappings part that all of you have been
mentioning as an option, because that is what I am currently using and
trying to move away from.  The regex filters do work, but they redirect
the request, while what I want to do is forward the request thus hiding
the bookDetail.html?xxx from the browser url.

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