* Dami Laurent (PJ) <laurent.d...@justice.ge.ch> [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. Instead you merely want to avoid doing any recomputation for some predefined period of time, regardless of your state. This is a case for caching: since you aren’t going to recompute the page until said time has passed, you may as well tell the client that it’s superfluous for them to try asking again before that period is up. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/