You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Bowler <pa...@www.aventix.co.uk> on 2003/12/03 12:05:21 UTC

Caching remote URL's

Our sitemap has a number of pipelines that get content from remote XML resources (news feeds etc) and, even with 
avalon caching enabled, the remote connection is opened every time. From the limited documentation on this I think 
only local files are ever cached by using the timestamp, but URL's are not.

I have cached the whole pipeline so that the final HTML is cached but this can be overridden by clicking the browser 
refresh button. This is not enough for us as each remote connection slows the response times significantly for the 
user.

I need a way to ALWAYS cache content from a remote URL for a specified period of time. Has anyone any idea how I can 
do this?

Paul.

--
Paul Bowler
Aventix Associates Ltd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Caching remote URL's

Posted by Matthew Langham <ml...@s-und-n.de>.
Hi Paul,

> time. From the limited documentation on this I think
> only local files are ever cached by using the timestamp, but
> URL's are not.
>

The caching of URLs depends on the Last-Modified timestamp. For this the
connection to the remote source needs to be opened.

If you need a different caching strategy (say dependent on some information
in the data or on a "per hour" basis) then you would need to adapt a
component like the FileGenerator to do this.

We have done this several times and it it the correct way to integrate to
the Cocoon caching strategy.

Let me know if this helps.

Matthew

--
Open Source Group              { Consulting, Training, Projects }
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
-----------------------------------------------------------------
    Orixo, the XML business alliance: http://www.orixo.com
-----------------------------------------------------------------
=================================================================




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org