mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
298 B
Lua
20 lines
298 B
Lua
11 years ago
|
--[[
|
||
|
Inheritable abstraction for cache items
|
||
|
--]]
|
||
|
|
||
|
local CacheItem = {
|
||
|
size = 64, -- some reasonable default for simple Lua values / small tables
|
||
|
}
|
||
|
|
||
|
function CacheItem:new(o)
|
||
|
o = o or {}
|
||
|
setmetatable(o, self)
|
||
|
self.__index = self
|
||
|
return o
|
||
|
end
|
||
|
|
||
|
function CacheItem:onFree()
|
||
|
end
|
||
|
|
||
|
return CacheItem
|