I download few files apart from images in the server. These downloaded files are cached using TTURLCache. Over a period of time, the disk space consumed by the app can grow. For the same reason, there is a feature in the app's settings to selectively clear the cached information.
With the help of this post I am able to delete the stored files in local disk corresponding to the URL from server. This clears data from this sandbox location: "Library/Caches/Three20".
However, I observed that if I switch to offline mode, the app is still able to pull the remote resources and render data. Also, it adds back the files into "Library/Caches/Three20" location even though there is no internet connectivity! On further scrutiny, I observed that there is a cache database from where the requests are fetched:
"Library/Caches/com.yourcompany.yourapp/Cache.db" "Library/Caches/com.yourcompany.yourapp/Cache.db-shm" "Library/Caches/com.yourcompany.yourapp/Cache.db-wal"
All fine, so I tested that apart from selectively clearing the files from the location "Library/Caches/Three20" I would have to selectively remove the database entries from the db: "Library/Caches/com.yourcompany.yourapp/Cache.db", "Library/Caches/com.yourcompany.yourapp/Cache.db-shm" & "Library/Caches/com.yourcompany.yourapp/Cache.db-wal".
I checked the code, but I could not find out where exactly data is written to Cache.db and where am I supposed to clear the info in it.
Any leads would be greatly appreciated.