18 lines
502 B
Lua
18 lines
502 B
Lua
local util = require("util")
|
|
|
|
if not app.cache['experiences.html'] then
|
|
|
|
app.cache['experiences.html'] = util.memoize(
|
|
function()
|
|
print("processing!")
|
|
local data = util.merge({foo='1'},{ opts = app.opts })
|
|
local html = util.template( LoadAsset("page/experiences.html"),app)
|
|
return html
|
|
end,
|
|
60*5 -- re-run every 5 mins (otherwise return cache)
|
|
)
|
|
end
|
|
|
|
SetStatus(200)
|
|
SetHeader('Content-Type', 'text/html; charset=utf-8')
|
|
Write( app.cache['experiences.html']() )
|