filecache.lua@25ba15b1982a
filecache.lua
Fri, 24 Jan 2025 13:28:19 +0100
- author
- Tuomo Valkonen <tuomov@iki.fi>
- date
- Fri, 24 Jan 2025 13:28:19 +0100
- changeset 45
- 25ba15b1982a
- parent 7
-
038275cd92ed
- permissions
- -rw-r--r--
Update dependencies. Still no updated markdown-it that wouldn't use deprecated punycode.
--@module filecache
local filecache={}
local cache={}
function filecache.get(file)
if not cache[file] then
local f=io.openX(file, "r")
cache[file]=f:read('*a')
f:close()
end
return cache[file]
end
return filecache