• Resolved marketeeringroup

    (@marketeeringroup)


    Hello,

    I’m wondering if it’s safe to delete the files in the “/cache/asset-cleanup/_storage/_recent_items” folder, and how to do so?

    We initially had the JS and CSS minification settings enabled on our site, but recently disabled them. We are still using the plugin to selectively remove scripts and stylesheets. We had a plugin that seemed to be conflicting with the minification, and creating thousands of cache files, which was taking up a lot of space on our server. After turning off the minification settings, I set the “Clear previously cached CSS/JS files older than (x) days” setting to 0, and cleared the CSS/JS files cache.

    This seemed to work for the “/cache/asset-cleanup/css” and “/cache/asset-cleanup/js” folders, as they are now much cleaner, but the “/cache/asset-cleanup/_storage/_recent_items” folder still contains almost 10,000 files. I attempted to manually delete them on a staging site, but they seemed to be re-generated again. Is there a safe way to remove these permanently?

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @marketeeringroup The fact that the “/cache/asset-cleanup/_storage/_recent_items” directory has so many files suggests that the handles of the CSS/JS items as well as the content is changing dynamically (e.g. it’s not a static file like most of them are within plugins/themes). However, Asset CleanUp has been optimised to work well in these types of situations too, making me think that your website and perhaps similar ones are having a characteristic that is making “recent_items” directory to grow this way.

    Yes, you can delete all items from that directory. After you do that, clear any page caching (e.g. if you are using a plugin such as WP Rocket or your hosting company has a page caching service) and everything should be fine. Note that “recent_items” will start having files again and if nothing changed recently (e.g. no plugin deleted, no changes on the number of CSS/JS files loaded), then the same pattern will likely occur: it will have lots of files, at least, it won’t be straight away.

    Consider writing to me here: https://www.gabelivan.com/contact/ – I could check your website. I might find the reason behind this issue by just analysing all the assets that are loaded there. Something is just different there.

Viewing 1 replies (of 1 total)

The topic ‘Cache _recent_items file deletion’ is closed to new replies.