diff options
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -119,9 +119,8 @@ local function cached_xc_call(method) script_dir, 'cache/' .. xc.server:gsub('%W', '_') .. '.' .. method) - local f = io.open(path, 'r') - if f then - f:close() + local f = mp_utils.file_info(path) + if f and os.time() - f.mtime < 24*60*60 then return util.read_json_file(path) end |
