Closed boduoduo closed 1 week ago
I viewed the apple developer document,timeIntervalSinceReferenceDate
returns the interval between the date object and 00:00:00 UTC on 1 January 2001, so if using time1 > time2, the recent files will be in the front of the files sorted, and they will be removed in advance.
I came here to open this exact pull request. Right now when calling removeExpiredObjects
with cache size above its maxSize
the most recently cached files are deleted. It seems clear that the oldest objects should be removed instead.
I would love to avoid forking this repo. @3lvis please consider merging this important bugfix.
Merged @dfmuir !
Wait, are you telling me this code was wrong all this time and no one noticed? :O