-
Notifications
You must be signed in to change notification settings - Fork 2k
shared.DICT and expiration time #552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@bungle Maybe we can just borrow the redis command names here? i.e., local exptime, err = dict:ttl(key)
local ok, err = dict:expire(key, seconds) The direction is to support more and more redis commands in lua_shared_dict in the future :) |
@agentzh, oh, I had forgotten that for lua_shared_dict you had such a broad goals. That would work just as well. I kinda had / have an use case for this, and that's why I asked. You see I have been adding pluggable storage adapters to lua-resty-session. One of the adapters is shm that uses lua_shared_dict, as you can see here: https://github.com/bungle/lua-resty-session/blob/storages/lib/resty/session/storage/shm.lua#L31 The line 31 is really just updating the expiration time, and it is unneccessary to update the value at that point. |
@bungle Fair enough :) Will you contribute a patch for this feature? |
I will look at it. |
Cool, thanks! |
Even I felt the need of such a feature. Any update on whether this is available in any release? |
@navneet-flipkart Not yet. The PR is still being reviewed. |
queue |
queue... I need it |
Need this as well |
@guanhui07 @GitZhaoYang the shdict list data type support has already been released in the latest OpenResty version 1.11.2.1. @junos I'm not sure what you are referring to. This ticket is more about expiration time, isn't it? |
Done in #140 - we can close this |
I would like to see a way to retrieve and set shared dictionary expiration time.
E.g.
Or
And
Does it make sense or is it unneccessarely difficult and bloat?
The text was updated successfully, but these errors were encountered: