* internal/memory: cache timestamp
* internal/memory: ensure to never delete non-expired items
This fixes a TOCTOU problem between a mutex rlock and a mutex lock.
* internal/memory: move costly operations outside of locked area
* internal/storage: cache timestamp
* internal/storage: ensure to never delete non-expired items
This fixes a TOCTOU problem between a mutex rlock and a mutex lock.
* internal/storage: move costly operations outside of locked area