--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/filecache.lua Sun Sep 13 22:22:47 2009 +0300 @@ -0,0 +1,13 @@ + +module("filecache", package.seeall) + +local cache={} + +function 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