• Resolved Adarsh Pawar

    (@axmusic)


    I have this plugin installed and it is working perfectly. But in my WordPress directory there is a folder (wp-content\cache\asset-cleanup\) which 165MB huge. I want to know what is the purpose/use of this folder and files under it. I have limited memory so, can I delete this folder of some of its files to save storage.

    Folder Screenshot: https://i.imgur.com/oRUAPuK.png
    Folder size Screenshot: https://i.imgur.com/ixyGRf5.png

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

    (@gabelivan)

    @axmusic thanks for letting me know about this! There are constant efforts to prevent this directory from getting too large, especially after the latest updates. It looks like there are situations when this can grow big. Sometimes, we’re talking about GB, not 165 MB which is a lot, but still under control. Now, please don’t delete this directory. Can you please ZIP it, put it on Google Drive (or somewhere similar) and share it with me? You can send me the download link privately via https://gabelivan.com/contact/ – I’d like to check it out and see how files were created there.

    Thread Starter Adarsh Pawar

    (@axmusic)

    Plugin Author Gabe Livan

    (@gabelivan)

    @axmusic I’ve checked the files within the directory and obviously the ones taking over 90% of the spaces are the CSS combined ones. As you unload & load back CSS files, including rules such as excluding certain files from being added to a combined CSS file, various files are created and kept there as they are needed in case any caching service (including Google) you might be using has created a version of that page the is loading CSS from one of those cached files.

    I’ve checked the whole directory and it only has 245 items so it’s not that bad. Are you having issues with the disk space on your hosting package? One thing I did notice and has to be improved is the fact that, sometimes, there is the same file created for both the guest and the logged-in user. So, this is something worth improving in a future version of the plugin.

    Hi Gabe!

    For my website wp-content\cache\asset-cleanup\js\ folder after latest updates became to grow quickly. Now its size is 11 GB/22043 inodes! Pretty big even to put it to google drive. I’ve downloaded one file from there as example – you may find it here: https://drive.google.com/file/d/1FqDZH-p3mpZvrfAEqz-jINvOJTvTVLDA/view?usp=sharing
    all other filenames looks same way.
    Can I remove these files, as my hosting is overloaded with them? And how can be prevented their creation in future?

    Plugin Author Gabe Livan

    (@gabelivan)

    @romantic20 yes, you can remove those files! New ones will be re-created (if you keep the combine JavaScript option enabled), however, I managed to identify the cause, by checking the files. The inline JS that is associated with some of the files that are loaded is dynamically changing on every page load (non-cached), thus, it leads to the creation of new JS files. I’ll make this a priority and either find a way to avoid the creation of so many files or add an option to exclude that inline code from being added to the combined JS files.

    PS: Ideally, try to leave the files created in the past 2/3 days in case you’re using a caching plugin that generated static HTML pages which are still making references to those combined JS files from Asset CleanUp.

    Thanks, Gabe!
    Yes, hope in future releases this problem will go away – or at least would be an option to exclude that code.

    Just discovered this folder sitting at a whopping 19Gb. Am I doing something wrong? Gonna delete it and reset all my caches afterward. Hope it doesn’t get that big again.

    Plugin Author Gabe Livan

    (@gabelivan)

    @northlandscollege if you update to the latest version, there’s an improvement that would automatically disable certain options (e.g. do not append inlined JS code to the combined JS files) as it’s very likely they are the cause of redundant CSS/JS files that are generated on each page load and take too much time.

    Can you check which directories within /wp-content/cache/asset-cleanup/ has the most files? I’m trying to understand how those files were generated in the first place. If you have a pretty decent internet connection, can you ZIP it and upload it somewhere in the cloud and share the location privately via https://www.gabelivan.com/contact/ if you believe they contain sensitive information you don’t want to share publicly?

    @gabelivan
    Been running the latest versions. I’ll check those options. My CSS/JS is managed and minified/combined by another plugin. I’ve got decent internet but have begun the clean process already. Sorry, seee below.

    /asset-cleanup: 82 bytes
    /asset-cleanup/_storage/item: 1.86 KB
    /asset-cleanup/css: 27 bytes
    /asset-cleanup/css/item: 19599.95 MB @ 30,000 files
    /asset-cleanup/css/item/inline: 27 bytes
    /asset-cleanup/css/logged-in: 27 bytes
    /asset-cleanup/js: 27 bytes
    /asset-cleanup/js/item: 1.96 MB
    /asset-cleanup/js/item/inline: 27 bytes
    /asset-cleanup/js/logged-in: 27 bytes

    Plugin Author Gabe Livan

    (@gabelivan)

    @northlandscollege I have to admit I wasn’t expecting the /asset-cleanup/css/item directory to be the one with so many files. Usually, this one has the most files: /asset-cleanup/js.

    I wish you hadn’t begun clearing them. If there are any files left in /asset-cleanup/css/item, please ZIP them and put the file in the cloud for downloading. I checked the website you have on your www.ads-software.com profile, but couldn’t find anything that would make me understand what happened there. If that directory begins to fill again (e.g. to 1 GB which is still a lot), please let me know and I can investigate those files.

    @gabelivan Yes, if it happens again. I’ll send it over and message you. I’ve cleared the directory already.

    growthsquad

    (@growthsquad)

    We are experiencing the same issue, over 19GB of files in wp-content\cache\asset-cleanup.

    Had to clear the cache due to server storage.

    I’m running version 1.3.6.9 does 1.3.7.1 resolve this?

    Plugin Author Gabe Livan

    (@gabelivan)

    @growthsquad if you check the “Development” tab here https://www.ads-software.com/plugins/wp-asset-clean-up/#developers you will notice that in version 1.3.7.0 (you have an older one), there was a change that would automatically attempt to prevent the generation of so much combine JS files by excluding the associated inline JS code from each file from the inclusion in the combine JS main file. There are instances when that content is not unique and it’s generated on every page load. That’s the main reason you’re getting so many files generated.

    If, after the upgrade, this issue will persist, then the problem is from somewhere else and it needs to be investigated. For now, please delete the files (e.g. via SFTP or cPanel) and upgrade to the latest version of the plugin.

    Let me know if you have any questions about what I just explained!

    ochope

    (@ochope)

    Hi,
    can you specify what can safely be deleted from the /wp-content/cache/asset-cleanup/ directory?

    Maybe you have command lines to share?
    We really need to lean this down. Thanks!

    Plugin Author Gabe Livan

    (@gabelivan)

    @ochope the best way to clear files from that directory is to use the clear caching link within the plugin. However, if there are too many files and it will give you a timeout error, then you have to connect via SFTP or cPanel (or whatever tool you use from your hosting account), sort the files via the last modified/creation date, and notice the oldest ones. If they are older than three days, I’ll go ahead and delete them (with many FTP clients, you can select multiple files and proceed with the deletion, without having to do it one by one).

    PS: It shouldn’t be over 1 GB. I’ll make sure in future tag releases, this will be considerably lower.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Huge size folder under wp-content\cache\asset-cleanup’ is closed to new replies.