lua-resty-mlcache
lua-resty-mlcache copied to clipboard
Add an option to run without LRU cache
This can help environment where a smaller memory footprint is required, by taking advantage of the shared memory nature of the L2 (shm) cache.
this is a great feature, i could not find the implementation from master,isn't done? where can i find it? or does it need myself to finish?
@FengXingYuXin This feature is not implemented yet. Contributions welcome!
For now it can be achieved by:
local noop = function() end
local noop_lru = {set = noop, get = noop, delete = noop, flush_all = noop}
local noop_ipc = {subscribe = noop, broadcast = noop, poll = noop, register_listeners = noop}
mlcache.new("name", "shm", {
lru = noop_lru,
ipc = noop_ipc
})
It will break after purge()
is called, but for some use cases it may be enough.