OSDN Git Service

stopped to use cache file for fonts
[luatex-ja/luatexja.git] / src / ltj-jfont.lua
index 09a5677..82e2808 100644 (file)
@@ -827,35 +827,14 @@ end
 
 --
 do
-   local cache_ver = 19
-
    local function prepare_extra_data_base(id)
       if (not id) or (not id.filename) then return end
       local bname = id.psname or file.nameonly(id.filename)
       if not font_extra_basename[bname] then
-         -- if the cache is present, read it
-         if not lfs then lfs=require"lfs"  end
-         local newtime = lfs.attributes(id.filename,"modification")
-         local v = "extra_" .. string.lower(bname)
-         local dat = ltjb.load_cache(
-            v,
-            function (t) return (t.version~=cache_ver) or (t.modtime~=newtime) end
-         )
-         -- if the cache is not found or outdated, save the cache
-         if dat then
-            font_extra_basename[bname] = dat[1] or {}
-         else
-            local dat = nil
-            dat = prepare_fl_data(dat, id)
-            dat = list_rotate_glyphs(dat, id)
-            font_extra_basename[bname] = dat or {}
-            ltjb.save_cache( v,
-                             {
-                                modtime = newtime,
-                                version = cache_ver,
-                                dat,
-                             })
-         end
+         ltjb.remove_cache("extra_" .. string.lower(bname)) -- remove cache
+         local dat = prepare_fl_data(dat, id)
+         dat = list_rotate_glyphs(dat, id)
+         font_extra_basename[bname] = dat or {}
          return bname
       end
    end