webmcp

diff framework/env/request/allow_caching.lua @ 291:fa3a5bba0067

Cache control; Added documentation for request.add_header(...)
author jbe
date Sun Mar 22 17:03:01 2015 +0100 (2015-03-22)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/framework/env/request/allow_caching.lua	Sun Mar 22 17:03:01 2015 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +--[[--
     1.5 +request.allow_caching()
     1.6 +
     1.7 +Includes a "Cache-Control" header in the response that marks the content as cachable.
     1.8 +
     1.9 +--]]--
    1.10 +
    1.11 +function request.allow_caching()
    1.12 +  request.configure(function()
    1.13 +    request._cache = true
    1.14 +  end)
    1.15 +end

Impressum / About Us