is it safe to delete x-cart cache files?

471 Views Asked by At

I am using an xcart eshop. The site is working fine but it has created more than 5 GB of data in tha datacahce folder. My question is: Is it safe to simply delete all these files as well as the file structure under the folder datacache in order to remove these 5GB of my server and how can I avoid future large caching. I also attach an indicative screenshot of the datacache filestructure. enter image description here

1

There are 1 best solutions below

0
Sergey Fomin On

You can remove the var/datacache and var/packs sub-folders in your X-Cart installation.

I would also recommend you to set up a cron job to regularly clean up the content of the var/datacache folder.

For example:

cd /var/www/vhosts/yourdomain.com; find ./var/datacache -mmin +60 | xargs rm -rf

This command is aimed to find and remove all the files that are older than 60 minutes and located in the respective var/datacache sub-folder of your X-Cart installation.

Set up your cron job to be executed once per hour, via your website Control Panel (cPanel or Plesk).