* Dami Laurent (PJ) <[email protected]> [2010-01-18 08:35]:
> 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.

I suggest you send an ETag and check `If-None-Match` (possibly
just a hash of the timestamp for the config file) instead of
(or if you have HTTP/1.0 clients, in addition to) relying on the
timestamp and `If-Modified-Since`.

Beyond that:

It’s easy to write a module that will conserve bandwidth using
these headers, by hashing the body after all computation is done
and checking whether to send it or just a 304.

But conserving server CPU requires intimate knowledge of both the
model and the structure of the controllers. It seems hard to find
a generically useful abstraction beyond a utility method or two
for setting the headers.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
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