Clearing cache not working
See original GitHub issueHi,
I’m trying to clear the cache under ionic 4 in iOS.
My code looks like this:
const filesBefore = await this.file.listDir(this.file.cacheDirectory, 'image-loader-cache');
console.log('Files before:', filesBefore);
await this.imageLoader.clearCache();
const filesAfter = await this.file.listDir(this.file.cacheDirectory, 'image-loader-cache');
console.log('Files after:', filesAfter);
In the console it looks like this:
Files before: [Array] (306)
Files after: [Array] (306)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Chrome WON'T clear cache... ctrl + F5 doesn't seem to work ...
Click on the 3 vertical dots on the top right corner of the browser · Click on "More tools" · Click on "Clear...
Read more >How to clear cache and cookies (Chrome hard refresh)
To clear your cache and cookies on Chrome, open the Chrome Menu and select Clear Browsing Data. Another keyboard shortcut to access this...
Read more >Clear cache & cookies - Computer - Google Account Help
On your computer, open Chrome. · At the top right, click More More . · Click More tools and then Clear browsing data....
Read more >How to Clear the Cache and Cookies in Your Web Browser
Clearing the cache and cookies from a web browser is an important first-step for almost any troubleshooting for internet browsing.
Read more >Troubleshooting: Clearing Browser Cache & Cookies
Troubleshooting : Clearing Browser Cache & Cookies · What's in this article: · How to clear your cookies and cache by browser: ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @Bart1909 To solve the problem of delete the old image, I did a method to remove the cached file. It works! But while I doesn’t restart the app, the image not change (dont know why). So, to change it instantly I ended up doing the same approach as you, adding a query parameter to load again.
If anyone wants, to remove the cached file:
thanks @pcsantana for your code. This works.