Read A Key (LCC.kvdb.dict.get)
Signature
value, err = LCC.kvdb.dict.get(name, key, timeout?)
Parameters
- name
String. Dictionary name (non-empty, max256bytes). - key
String. Key to read (must be valid UTF-8 and non-empty). - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- value
String. Value stored for the key;nilwhen missing. - err
String ornil. Returns'not found'when the key is absent, or an error description for other failures.
Notes
Fetches the value for the given key.
Missing keys returnnil, 'not found'.
Example
local value, err = LCC.kvdb.dict.get("settings", "retry")
if value then
print("Current retry count:", value)
end