FixedAgeOldestCacheCleanupTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Track artifact cache file access in PersistentIndexedCache

This commit introduces the `FileAccessJournal` interface and provides

two implementations:

ModificationTimeFileAccessJournal::

Reads and sets `File.lastModified()`.

IndexedCacheBackedFileAccessJournal::

Uses a PersistentIndexedCache to store the access timestamp.

The latter is now used in DefaultCacheLockingManager for the artifact

cache. All other PersistentCaches still use the former.

    • -71
    • +0
    ./FixedAgeOldestCacheCleanupTest.groovy
  1. … 30 more files in changeset.
Return Collection instead of File[]

    • -2
    • +2
    ./FixedAgeOldestCacheCleanupTest.groovy
  1. … 5 more files in changeset.
Polish and document new top-level types

    • -1
    • +1
    ./FixedAgeOldestCacheCleanupTest.groovy
  1. … 18 more files in changeset.
Clean up least recently used entries in artifacts file store

The files in the artifacts file store cache are now automatically

cleaned up based on a least recently used strategy. The structure in

the cache is as follows:

- modules-2

- files-2.1

- groupId

- artifactId

- version

- hash1 (*)

- file

- hash2 (*)

- file

The cache now keeps track of files accessed inside the marked hash

directories. The cleanup action then deletes all such files that have

not been accessed in the last 30 days.

    • -2
    • +0
    ./FixedAgeOldestCacheCleanupTest.groovy
  1. … 15 more files in changeset.
Clean up least recently used entries in external resources file store

The files in the external resources file store cache are now

automatically cleaned up based on a least recently used strategy. The

structure in the cache is as follows:

- modules-2

- resources-2.1

- 0

- hash 1 (*)

- hash 2 (*)

- ...

- ...

The cache now keeps track of files accessed inside the marked hash

directories. The cleanup action then deletes all such files that have

not been accessed in the last 30 days.

    • -1
    • +3
    ./FixedAgeOldestCacheCleanupTest.groovy
  1. … 29 more files in changeset.
Detangle PersistentCache cleanup action dependencies

- Introduce a new CleanupAction

- Decorate CleanupActions via CleanupActionFactory

- Remove the special case for keeping .part files

- Ask PersistentCache for "reserved" files, these files should never be cleaned up

- Reduce the number of build operations produced when cleaning a PersistentCache

Signed-off-by: Sterling Greene <sterling@gradle.com>

    • -2
    • +1
    ./FixedAgeOldestCacheCleanupTest.groovy
  1. … 23 more files in changeset.
Add persistent cache cleanup action that deletes files older than a given age

Signed-off-by: Sterling Greene <sterling@gradle.com>

    • -0
    • +72
    ./FixedAgeOldestCacheCleanupTest.groovy
  1. … 7 more files in changeset.