From 808e70bd7ccff7c25c4e1979bf9eec204ed8cb3c Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 28 Oct 2010 19:38:16 +0200 Subject: Sync with context 2010.10.22 This is a big sync and things might be seriously broken. --- otfl-data-con.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'otfl-data-con.lua') diff --git a/otfl-data-con.lua b/otfl-data-con.lua index e7bb8af..5d9650f 100644 --- a/otfl-data-con.lua +++ b/otfl-data-con.lua @@ -25,13 +25,15 @@ table structures without bothering about the disk cache.

Examples of usage can be found in the font related code.

--ldx]]-- -containers = containers or { } - +containers = containers or { } +local containers = containers containers.usecache = true +local report_cache = logs.new("cache") + local function report(container,tag,name) if trace_cache or trace_containers then - logs.report(format("%s cache",container.subcategory),"%s: %s",tag,name or 'invalid') + report_cache("container: %s, tag: %s, name: %s",container.subcategory,tag,name or 'invalid') end end @@ -48,7 +50,8 @@ local mt = { t.readables = readables return readables end - end + end, + __storage__ = true } function containers.define(category, subcategory, version, enabled) @@ -78,7 +81,7 @@ function containers.define(category, subcategory, version, enabled) end function containers.is_usable(container, name) - return container.enabled and caches and caches.iswritable(container.writable, name) + return container.enabled and caches and caches.is_writable(container.writable, name) end function containers.is_valid(container, name) -- cgit v1.2.3