Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The problem this PR targets to solve is detailed in #1803 Drawback of previous design is detailed in #1841 New design: Create a file in each project directory and write the size of the project to the file when the project is created. The project files are not supposed to change after creation. Touch this file each time the project is used. This way, we can have a more efficient LRU algorithm based on last access time, not creation time. Maintain the total size of the project cache in memory to avoid the overhead of re-calculating it. The size shouldn't change too often. This way we can afford to run the check more frequently. Project dir size check and corresponding deletion will be performed when a new project is downloaded. This PR implements part 2. Next step is to shorten execution dir retention period to really free up space, given there's always a hard link from execution to project directory.
- Loading branch information
1 parent
c6509ee
commit 0408919
Showing
6 changed files
with
264 additions
and
79 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
Oops, something went wrong.