add defaults.lua

This commit is contained in:
Qingping Hou
2013-07-01 02:41:33 -04:00
parent 5a9f83279f
commit 18122fe067
6 changed files with 128 additions and 29 deletions

View File

@@ -1,6 +1,10 @@
--[[
Inheritable abstraction for cache items
]]--
--]]
require "defaults"
CacheItem = {
size = 64, -- some reasonable default for simple Lua values / small tables
}
@@ -20,7 +24,7 @@ A global LRU cache
]]--
Cache = {
-- cache configuration:
max_memsize = 1024*1024*10, -- 10MB cache size
max_memsize = DGLOBAL_CACHE_SIZE,
-- cache state:
current_memsize = 0,
-- associative cache