Clear cache
Hi, I added a couple of things that I needed so just wanted to see if you want them in original project as well. If not, nvm :)
I wanted to be able to:
- clear entire cache from time to time, e.g. when completely changing the "playlist". I used your code from the sample for this (and also updated the sample to remove that, now redundant, code)
- clear single cached video when I 100% know it won't get played again; that way I might avoid another video getting kicked out from the cache because there's not enough space
I've noticed a problem - it seems that the info storage entries are never removed, even if the corresponding video is removed from cache. The entries may be small, but even if it takes thousands, it's a risk I can't take, so I had both of those operations above do the full storage clear and sigle entry clear respectively. I didn't try to implement this when the normal removal of old cached files is done, the "clear entire cache" thingy is enough for me, since I call that periodically.
Thank you for sharing these changes. I was just about to implement similar functionality myself. In my case, the content at the source periodically changes, but the URL doesn't and prior to this, there was no easy way to clean out the cache to force it to download new.
good news .