Anyone here have any success adding caching headers to output of Dancer? I've tried using header (as stated in my previous mail), but that only works with the output of TT, not with JSON output. It should be trivial, but somehow the headers are being deleted before the (JSON) page is sent. Nick Hibma AnyWi Technologies P.S.: Rationale: I do data viewing through a javascript app and it relies on caching in the browser of the paged datasets for performance. At the moment I can see that that pages are fetched from the database all the time, which won't work with 25M entries over 2 months 2 ships (will be 1 year over 20 ships soon).
Hi Nick, On Wed, 2011-01-19 at 12:20 +0100, Nick Hibma wrote:
Anyone here have any success adding caching headers to output of Dancer?
I've tried using header (as stated in my previous mail), but that only works with the output of TT, not with JSON output.
It should be trivial, but somehow the headers are being deleted before the (JSON) page is sent.
Sorry to see your previous mail never got an answer. This does indeed seem to be a bug/misfeature in send_file(), it creates a new request and generates a new response. I've raised this as an issue on Github for easy tracking: https://github.com/sukria/Dancer/issues/issue/260 Thanks for bringing it up! Cheers Dave P -- David Precious <davidp@preshweb.co.uk> ("bigpresh") http://www.preshweb.co.uk/
participants (2)
-
David Precious -
Nick Hibma