Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and optimize memory storage (#2207)
* 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
- Loading branch information
1 parent
e5ae764
commit a0645af
Showing
2 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters