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

Finally figured out the issue.  It turned out that somehow my servlet
mapping was not being recognised, and the actual processing was being
performed by our application wide error handler (it should never have
attempted to process a regular request in the first place...), and I am
pretty sure that is why the responses were not being cached.

For some strange reason the servlet mapping was not being picked up, until
I did an activate including child nodes once again.  Everything is working
fine now.

Thanks
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