Roxen.git
/
server
/
modules
/
tags
/
static_resource.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/tags/static_resource.pike:12:
<li>Setting a far-future Expires HTTP header, as described by <a href=\"http://developer.yahoo.com/performance/rules.html#expires\">Yahoo!</a></li> <li>Injecting a variable part in the resource URL that changes whenever the linked resource file changes</li> </ol> </p> <p>These two features combined will make sure that the resource files are browser-cached for as long as possible while avoiding overcaching.</p> "; constant module_type = MODULE_FILTER | MODULE_TAG;
-
constant expire_time = 86400*365; // One year.
-
+
constant default_process_tags = ([ "link" : "href", "script" : "src" ]); void create(Configuration conf) { defvar("process_tags", Variable.Mapping(default_process_tags, 0, "Tags to process", "The tags to process and the corresponding " "attribute that refers an external resource."));
Roxen.git/server/modules/tags/static_resource.pike:100:
if (!res) return; if(id->prestate["cache-forever"]) { if (res->extra_heads) { m_delete(res->extra_heads, "cache-control"); m_delete(res->extra_heads, "Cache-Control"); m_delete(res->extra_heads, "expires"); m_delete(res->extra_heads, "Expires"); }
-
RAISE_
CACHE
(expire
_
time
);
+
CACHE
_
INDEFINITELY
();
PROTO_CACHE(); id->misc->vary = (<>); return res; } } TAGDOCUMENTATION; #ifdef manual constant tagdoc = ([