filecache.lua

changeset 7
038275cd92ed
parent 3
b2df1b3f2c83
--- a/filecache.lua	Sun May 07 20:02:53 2017 +0100
+++ b/filecache.lua	Tue Jan 16 16:39:48 2018 +0000
@@ -1,9 +1,11 @@
 
-module("filecache", package.seeall)
+--@module filecache
+
+local filecache={}
 
 local cache={}
 
-function get(file)
+function filecache.get(file)
     if not cache[file] then
         local f=io.openX(file, "r")
         cache[file]=f:read('*a')
@@ -11,3 +13,5 @@
     end
     return cache[file]
 end
+
+return filecache

mercurial