devopshq / artifactory-cleanup

Extended cleanup tool for JFrog Artifactory
MIT License
121 stars 65 forks source link

Create an LRU cleanup policy (redis-like) #130

Open AJIOB opened 8 months ago

AJIOB commented 8 months ago

It needs to clean up the files with such algorithm (or the similar one):

  1. If the repository size less than or equal to the limit - nothing to do (exit)
  2. We need to remove the eldest-accessed file and go to step 1.

The second step condition to remove may be improved/simplified: firstly, remove all files that are DeleteNotUsedSince (very long period).

More info about Redis keys eviction policies can be found here.