Thanks Kerri
Useful information.
This is what I am thinking-
1) Every time the app starts, it will call a JS function.
2) This function will go through cordova.file.cacheDirectory and make a file list
3) Using the list it will find total size and older files.
4) If file size is greater than 50mb- start to delete (using a loop -> delete oldest -> check total size again -> delete oldest....)
Do you think it would be a good idea?
Hope it won't affect on performance much.
Now, I have gone through "File" plugin documentation and still not sure how to-
1) List all files in that directory
2) Delete a file.
I will keep researching & googling but if you know or have any example codes; would you mind sharing?
Appreciate your replies and assistance.
S