realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

Allow specifying maximum asset cache size #711

Open Stinkfist0 opened 11 years ago

Stinkfist0 commented 11 years ago

When cache gets full, the oldest assets should be purged.

jonnenauha commented 11 years ago

Obs how did I close this :D Sorry... seems like a good idea. Should probably be done inside AssetCache itself. QDir to sort cached assets by modify date and remove from there the needed files. This was implemented back in the Naali days before cache got the big rewrite. It's just important that once you are on the limit of going beyond the max size it should batch and delete something like ~50mb right away. Otherwise will get this write/read limbo for each cache store.