Cache
Cache copied to clipboard
Add support for contentAccessDate-based expiry and cleanup using custom expiry period
This PR adds support for cache cleanup based on a custom expiry period using the file’s contentAccessDate.
-
Added a new
removeExpiredObjects(expiryPeriod:)function. -
This compares the current time with each file’s contentAccessDate (if available) or modificationDate as a fallback.
-
If the file hasn’t been accessed within the specified
expiryPeriod, it is removed from the cache.
Thanks @Rohan-cod-intouch but this project is in maintenance mode and adding more functionality is not in the current scope of the project.
All changes will be scoped to fix or improve existing APIs.