summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-08-05 12:51:49 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-08-05 12:51:49 +0200
commitd6328e783739d68a132a33e0a95a2f7f90494f37 (patch)
tree31d3d1fc02887dea28431fd9341c0baa33c55b4a
parent1075688dae6cd26a52628d595bab3c4c5dae2e1d (diff)
downloadluaotfload-d6328e783739d68a132a33e0a95a2f7f90494f37.tar.gz
[db] flush lookup cache on db version change; bump version
-rw-r--r--luaotfload-database.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 7e1a274..5cbedd4 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -102,7 +102,7 @@ if config.luaotfload.update_live ~= false then
config.luaotfload.update_live = true
end
-names.version = 2.209
+names.version = 2.210
names.data = nil --- contains the loaded database
names.lookups = nil --- contains the lookup cache
@@ -2264,7 +2264,18 @@ update_names = function (fontnames, force, dry_run)
names.data = newfontnames
if dry_run ~= true then
+
save_names ()
+
+ local success, _lookups = flush_lookup_cache ()
+ if success then
+ local success = names.save_lookups ()
+ if success then
+ logs.names_report ("info", 2, "cache",
+ "Lookup cache emptied")
+ return true, true
+ end
+ end
end
return newfontnames
end