Clear cache app made in Kodular

how do I clear the app’s cache automatically as soon as the user leaves the app? the app is made using the mysql database and every time the user starts the app it stores the data cache, which is making the app very great. Please help me

Hi @Carlos3 Welcome to Kodular Community

Simply delete the cache dir.

2 Likes

try the ClearCache method from the tools extension
https://puravidaapps.com/tools.php
together with the Screen.OnAppStop event
Taifun

1 Like

Which block do I use?

I did this procedure but the cache was not deleted

bandicam 2020-05-30 03-11-06-194

Don’t post the same answer multiple times. I deleted one.

1 Like

Use exists and delete method of File component.

from the documentation

Clear the cache of the current app.
Returns true if clearing was successful, else false.

the method uses this snippet

and in the comments it has been mentioned, that it does not work anymore for Android N?
which Android version are you using for your tests and what was returned (true or false)?

just use the solution from @vknow360, which does the same, only manually…

Taifun

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.