>-----Message d'origine-----
>De : Aristotle Pagaltzis [mailto:[email protected]] 
>Envoyé : samedi, 16. janvier 2010 15:34
>À : [email protected]
>Objet : [Catalyst] Re: modules for conditional GET ?
>
>* Dami Laurent (PJ) <[email protected]> [2010-01-14 16:05]:
>> For some actions of a Catalyst app, I would like to implement
>> conditional GET (using If-Modified-Since HTTP header), where
>> the timestamp of one config file decides whether the page
>> should be refreshed or not  --- this is because that page is
>> quite expensive to compute.
>
>I agree with the others who have responded, but they didn't
>explain why theirs was the right answer, so:
>
>You're not checking whether any state has changed since the
>last GET to decide whether to recompute. That is the case in
>which conditional GET would be appropriate. That would allow
>you to avoid recomputing the page indefinitely as long as no
>state changes necessitate it, but it requires that the clients
>keep asking.
>

Indeed, this is exactly what I want to do. The app has a config file (not a 
Catalyst
config file, but another file having to do with business logic), and some 
super-users
have a mechanism for hot uploading of a new config to the server, at any time. 
A few app pages are expensive to compute, and they depend on the client and on 
that config file. So clients should keep asking for those pages at each 
request, and depending on the If-Modified-Since header and on the timestamp for 
the config file, the server can decide if it's worth recomputing the page for 
that client, or rather send a cheap 304 Not Modified.

Cheers, L. Dami

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to