-
-
Notifications
You must be signed in to change notification settings - Fork 216
Description
Request details
Hi!
When I switched from the filestorage provider to s3, I noticed some decline in performance. Now I got finally the time to have a deeper look.
A request to download a file which is already stored in s3 results into:
- 3 HEAD requests
- 1 actual GET request
I think some form of caching would be great. I know there is already #1983 but that is more towards the UI performance.
I would suggest to cache the head request results via something like https://github.com/ben-manes/caffeine
I would let the user opt-in via the following configuration settings on the s3 provider:
metadataCacheEnabled: true|false - defaults to false
metadataCacheExperiationAfterSeconds: number - defaults to 28800 -> 8h
metadataCacheMaxItems: number - defaults to 1000
We need to exclude SNAPSHOT from caching, since they might update. Otherwise, I would consider regular maven versions to never change. So if the cache has an entry which is gone from s3, the get file since results into a 404.
I don't think there is any need to sync caches between multiple nodes.
I am happy to give the implementation a try if you are interesting in this feature.