-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split cache's activate and sync steps into 2 ctx managers
Split the cache context manager into two: one for activate the cache (patch on enter and unpatch on exit) and the other to sync the cache to disk (clear the cache's stats on enter and sync if needed to disk on exit). This simplified the code and enabled to open and load the cache just once, avoiding if possible any hit to the disk.
- Loading branch information
Showing
2 changed files
with
49 additions
and
17 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