Hi,
I'm trying to share data between some light threads in a single worker with lua-resty-lrucache.
I tried initializing the cache a) in a global variable in init_by_lua directly, and b) by requiring a module that does the initialization in init_by_lua.
Then, I try to set some cache values in a timer handler inside init_worker_by_lua and it works fine, I can read the values back in the init_worker_by_lua handler.
The problem is that when I try to get some values from the cache in a light thread created in a content_by_lua block, the cache turns out to be empty.
Is that expected?
Is there a way to share data within a worker and be able to get/set values from different light threads?
-- sid