简体   繁体   中英

Should I delete cache with a timer or?

I've got a simple question

I made an application similar to instagram, the only difference is that it has more stories&posts because there's no following system.

I do cache the images and videos, but should I delete the caches with a timer?

It is lots of videos and images.


Or is it enough to cache and when terminating the app clear the caches

If you're using standard caching mechanisms like NSCache , the OS will automatically clean it when it needs more memory for other applications. You don't need to worry about cleaning cache manually, unless you need some app specific behaviour.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM