core/moduleapi.lua
changeset 5053 375ab71e4b37
parent 5024 d25e1b9332cc
child 5077 6c2c8bf36d22
--- a/core/moduleapi.lua	Sun Jul 29 22:21:58 2012 +0200
+++ b/core/moduleapi.lua	Mon Jul 30 00:40:02 2012 +0100
@@ -155,6 +155,9 @@
 		local shared = shared_data[path];
 		if not shared then
 			shared = {};
+			if path:match("%-cache$") then
+				setmetatable(shared, { __mode = "kv" });
+			end
 			shared_data[path] = shared;
 		end
 		t_insert(data_array, shared);
@@ -336,4 +339,4 @@
 	return io.open(path, mode);
 end
 
-return api;
\ No newline at end of file
+return api;