Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLEX prematurely purges older items from network debugging cache #173

Open
NSExceptional opened this issue Feb 25, 2017 · 8 comments
Open

Comments

@NSExceptional
Copy link
Collaborator

NSExceptional commented Feb 25, 2017

FLEX purges older items from the network debugging cache even when the cache is nowhere near full. I would assign this to myself if I could. I would like it to cache them to a temporary file or something, it's super annoying when recent requests are purged for seemingly no reason...

@NSExceptional
Copy link
Collaborator Author

I propose we give this a try as a replacement: https://github.com/nicklockwood/OSCache

Thoughts?

@aleksandergrzyb
Copy link

This is not connected to #91?

@NSExceptional
Copy link
Collaborator Author

After reviewing the comments it seems to be related, yeah. What happened there? It's 2 years old

@aleksandergrzyb
Copy link

Yeah, I know. 😞 I made a fork and implemented it privately using PINCache for my company internal purposes. The difference is that you cannot opt-out from persistence and PINCache dependency. Unfortunately I didn't have time to implement this and create a PR. I don't think I will have time anywhere soon. 😞

@NSExceptional
Copy link
Collaborator Author

NSExceptional commented Apr 1, 2017

Like disk persistence?

I'm hoping one of the contributors just gives me the OK to use Nick's cache. Anything is an improvement over the paranoid NSCache

@ryanolsonk
Copy link
Member

@NSExceptional I've been annoyed by this as well (particularly when backgrounding an app). I'm ok pulling in OSCache if you want to give that a shot.

@NSExceptional
Copy link
Collaborator Author

Awesome. I'll send a PR when I have time to do it.

@hiburn8
Copy link

hiburn8 commented Jun 21, 2018

This should be marked as an issue rather than enhancement. Since the user can control the amount of cache space they want to use with a slider (although this is fairly limited given some iOS devices have 4GB of RAM), and they can manually purge the cache, there really is no reason to use NSCache here... it introduces a behaviour that the user doesn't expect.
I would argue we can just use a NSMutableDictionary here and purge it under the behaviour that the user expects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants