Hi,
was looking through available documentation on github and openresty web but couldn't clarify fully how shared dict is cleaned.
According to
"When it fails to allocate memory for the current key-value item, then
set
will try removing existing items in the storage according to the
Least-Recently Used (LRU) algorithm. Note that, LRU takes priority over
expiration time here. If up to tens of existing items have been removed
and the storage left is still insufficient (either due to the total
capacity limit specified by
lua_shared_dict or memory segmentation), then the
err
return value will be
no memory
and
success
will be
false
."
Does LRU eviction distinguish between values where exptime was set and non-expirable items? Or just dumps oldest items regardless?
Other question is - is there any trigger which periodically (or when over some threshold) automatically flush_expired items?
Thanks in advance for the clarifications