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

Maximum cache size #83

Closed
koraykoska opened this issue Nov 14, 2016 · 6 comments
Closed

Maximum cache size #83

koraykoska opened this issue Nov 14, 2016 · 6 comments

Comments

@koraykoska
Copy link

Is it possible to set the maximum cache usage to a custom value? If not that would be a great idea to implement. I am using YYImage which caches all images automatically (which is great). But it would be useful if we could change the maximum size of the cache manually.

@HoneyLuka
Copy link

I think it already have this. See 'costLimit' and 'countLimit' in diskcache and memorycache

@koraykoska
Copy link
Author

@HoneyLuka Is it also possible to set a global limit instead of a limit per instance of diskcache or memorycache?

@HoneyLuka
Copy link

If you mean YYWebImage. It have a global cache, you can use it. see 'YYImageCache '

@koraykoska
Copy link
Author

@HoneyLuka Ok thank you, I have one more question. What is the costLimit? I understand what countLimit does but what happens if I set the costLimit to 100 for example?

@HoneyLuka
Copy link

It's simlar with NSCache. You can see apple document about 'NSCache', or http://stackoverflow.com/questions/10858815/nscache-auto-removal-policy

@koraykoska
Copy link
Author

@HoneyLuka Thank you

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

No branches or pull requests

2 participants