gnustep / libs-base

The GNUstep Base Library is a library of general-purpose, non-graphical Objective C objects.
https://www.gnustep.org/
GNU General Public License v2.0
932 stars 279 forks source link

GSFileURLHandle: Remove file handle caching #400

Closed hmelder closed 4 months ago

hmelder commented 4 months ago

Currently, GSFileURLHandle caches file handles indefinitely. I opted to use NSCache with the cost being the size of the loaded data. By default, the size of the cache is 4MiB. The cache registration functionality was moved into -[GSFileURLHandle loadInForeground] as we need to know the size of the retrieved data.

hmelder commented 4 months ago

Thinking about it, it might be better to just skip caching of file handles.

triplef commented 4 months ago

This was previously discussed here: https://github.com/gnustep/libs-base/pull/309#pullrequestreview-1556770837

rfm commented 4 months ago

On 6 May 2024, at 17:16, Hugo Melder @.***> wrote:

Thinking about it, it might be better to just skip caching of file handles.

Yes, I think that's the best thing for file URLs