Hello!
I've pushed a commit to the "shdict-safe-store" branch in ngx_lua's
git repos, which adds the new safe_set and safe_add methods for
ngx.shared.DICT objects:
https://github.com/chaoslawful/lua-nginx-module/commit/17b349e
To quote the commit log: "feature: added new methods safe_set and
safe_get to ngx.shared.DICT objects, which never override existing
unexpired items but immediately return nil and a "no memory" string
message when running out of storage. thanks Matthieu Tourne for
requesting this."
Comments welcome :)
Thanks!
-agentzh