mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
8f23cae1c0
The vfs-cache-max-size parameter is probably confusing to many users. The cache cleaner checks cache size periodically at the --vfs-cache-poll-interval (default 60 seconds) interval and remove cache items in the following order. (1) cache items that are not in use and with age > vfs-cache-max-age (2) if the cache space used at this time still is larger than vfs-cache-max-size, the cleaner continues to remove cache items that are not in use. The cache cleaning process does not remove cache items that are currently in use. If the total space consumed by in-use cache items exceeds vfs-cache-max-size, the periodical cache cleaner thread does not do anything further and leaves the in-use cache items alone with a total space larger than vfs-cache-max-size. A cache reset feature was introduced in 1.53 which resets in-use (but not dirty, i.e., not being updated) cache items when additional cache data incurs an ENOSPC error. But this code was not activated in the periodical cache cleaning thread. This patch adds the cache reset step in the cache cleaner thread during cache poll to reset cache items until the total size of the remaining cache items is below vfs-cache-max-size. |
||
---|---|---|
.. | ||
downloaders | ||
writeback | ||
cache_test.go | ||
cache.go | ||
item_test.go | ||
item.go |