From 808e70bd7ccff7c25c4e1979bf9eec204ed8cb3c Mon Sep 17 00:00:00 2001
From: Khaled Hosny
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