URGENT! How to clear the files in "fsCachedData"? It's growing without limitation?

My app uses a lot of network.request() function calls to download images from the Internet.

Over time I found the storage size of my app is growing even I delete all the files in Document/Cached/Temporary directories.

Therefore, I use “iExplore” tool to see what’s causing the storage size grow like this…

and I found there are tons of files in “fsCachedData” inside my app folder.

I think these files are generated by network.request() for cache mechanism, isn’t it?

Can I remove these files in “fsCachedData” by some function call?

My users have been complaining about it. They are deleting my app when they see my storage size is growing like crazy.

Corona, please help, it’s quite urgent.

I’m guessing from your mention of “iExplore” that you’re on Android. Is that correct?

Nevermind, it must be iOS.  Doing a search on Google yields:

http://blog.airsource.co.uk/2014/10/11/nsurlcache-ios8-broken/

We do nothing special with respect to caching requests in network.request() so I think the issue must due to the new version of iOS. 

What kind of network requests does your app make?  Images, text files, AJAX? If this is an iOS bug then any app that downloads stuff may have the same problem (and the “bug” may just be that the storage space is just being allocated incorrectly and “fsCachedData” is intended to grow until the operating system decides it’s time to purge it). 

If you file a bug with an app that reproduces the issue we can take a look and see if there’s anything we can do to mitigate (or even influence) this behavior.

Thanks for your reply and the article link.

I originally thought the cache system was maintained by Corona. And the article says this problem should be fixed in iOS 8.1.

That should be fine. I will test it once I get iOS 8.1.

One more question, how much space does Corona set to allow for the cache?

Corona probably doesn’t control that.

as the article sample code shows:

// Set up a 1MB RAM, 10MB disk cache in the default location (Library/Caches/com.whatever.myapp) NSURLCache \*cache = [[NSURLCache alloc] initWithMemoryCapacity:1000000 diskCapacity:10000000 diskPath:nil]; [NSURLCache setSharedURLCache:cache];

I think the cache size can be set up by the developer? 

I’m guessing from your mention of “iExplore” that you’re on Android. Is that correct?

Nevermind, it must be iOS.  Doing a search on Google yields:

http://blog.airsource.co.uk/2014/10/11/nsurlcache-ios8-broken/

We do nothing special with respect to caching requests in network.request() so I think the issue must due to the new version of iOS. 

What kind of network requests does your app make?  Images, text files, AJAX? If this is an iOS bug then any app that downloads stuff may have the same problem (and the “bug” may just be that the storage space is just being allocated incorrectly and “fsCachedData” is intended to grow until the operating system decides it’s time to purge it). 

If you file a bug with an app that reproduces the issue we can take a look and see if there’s anything we can do to mitigate (or even influence) this behavior.

Thanks for your reply and the article link.

I originally thought the cache system was maintained by Corona. And the article says this problem should be fixed in iOS 8.1.

That should be fine. I will test it once I get iOS 8.1.

One more question, how much space does Corona set to allow for the cache?

Corona probably doesn’t control that.

as the article sample code shows:

// Set up a 1MB RAM, 10MB disk cache in the default location (Library/Caches/com.whatever.myapp) NSURLCache \*cache = [[NSURLCache alloc] initWithMemoryCapacity:1000000 diskCapacity:10000000 diskPath:nil]; [NSURLCache setSharedURLCache:cache];

I think the cache size can be set up by the developer?