[ 
https://issues.apache.org/jira/browse/MBUILDCACHE-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Réda Housni Alaoui updated MBUILDCACHE-108:
-------------------------------------------
    Description: 
As of today, the only mecanism of local cache cleaning is based on the maximum 
local cache entries to keep. e.g. If configured to 10, when reaching the 
threshold during a build, this extension will remove as many cache entries as 
needed to pass the number of entries under the treshold.

On a dev machine, this is good enough. But on a CI machine, where many builds 
of the same artifact gav could be running concurrently, this is risky. You 
could have an ongoing build removing the cache of another ongoing build.

I propose to add a new cleanup strategy based on the last cache entry usage 
datetime. e.g. If configured to 7 days, the cleanup process would remove any 
cache entry that hasn't been used for more than 7 days.

  was:
As of today, the only mecanism of local cache cleaning is based on the maximum 
local cache entries to keep. e.g. If configured to 10, when reaching the 
threshold during a build, this extension will remove as many cache entries as 
needed to pass the number of entries under the treshold.

On a dev machine, this is good enough. But on a CI machine, where many build of 
the same artifact gav could be running concurrently, this is risky. You could 
have an ongoing build removing the cache of another ongoing build.

I propose to add a new cleanup strategy based on the last cache entry usage 
datetime. e.g. If configured to 7 days, the cleanup process would remove any 
cache entry that hasn't been used for more than 7 days.


> Remove local cache entries that have not been used during a configurable 
> period of time
> ---------------------------------------------------------------------------------------
>
>                 Key: MBUILDCACHE-108
>                 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-108
>             Project: Maven Build Cache Extension
>          Issue Type: New Feature
>            Reporter: Réda Housni Alaoui
>            Priority: Major
>
> As of today, the only mecanism of local cache cleaning is based on the 
> maximum local cache entries to keep. e.g. If configured to 10, when reaching 
> the threshold during a build, this extension will remove as many cache 
> entries as needed to pass the number of entries under the treshold.
> On a dev machine, this is good enough. But on a CI machine, where many builds 
> of the same artifact gav could be running concurrently, this is risky. You 
> could have an ongoing build removing the cache of another ongoing build.
> I propose to add a new cleanup strategy based on the last cache entry usage 
> datetime. e.g. If configured to 7 days, the cleanup process would remove any 
> cache entry that hasn't been used for more than 7 days.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to