- -- 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 {}