Cache Clear

I tried to clear my cache but then got these warnings. Can anyone tell me how to fix these



Warning: file_put_contents(/home/vrabbit/public_html/new_store/var/cache/lang_cache.GET_auth_login_form_EN_CAD.php) [function.file-put-contents]: failed to open stream: Permission denied in /home/vrabbit/public_html/new_store/core/class.registry.php on line 158



Warning: file_put_contents(/home/vrabbit/public_html/new_store/var/cache/cache_update_handlers.php) [function.file-put-contents]: failed to open stream: Permission denied in /home/vrabbit/public_html/new_store/core/class.registry.php on line 172

FTP to …/public_html/new_store/var/cache/ and delete everything in the cache folder - Sno

Is it safe to delete EVERYTHING in the /public_html/new_store/var/cache/ folder? I have another folder in there called PDF and subfolders of the PDF folder called CACHE, OUT and TEMP.



I just want to be sure before I delete absolutely everything as I don’t want to break anything.



Thanks.

You can delete everything inside /var/cache and /var/compiled - they are regenerated, as needed. The stuff in the enclosed /var/cache/pdf is related to printing PDF invoices and will be regenerated as needed. Clearing the cache does exactly the above - deletes everything in /var/cache and /var/compiled.



Bob

Thank you. All done and working OK. It’s nice to have reassurance!



In version 1.3.5, I have no cache folder but I do have a compiled folder. I presume it is OK to delete everything in this as well.



Sorry to be so hesitant but I really am scared I will break something and all the posts on here seem to be for version 2.



Interesting to note there is no cache folder in version 1.3.5 …

It is strange that there is no cache folder. It is fine to delete the compiled folder - the files there are created and maintained by the Smarty engine and get recreated as they are needed.



Bob

I’m actually pleased I have no cache folder as it seems to slow everything down a lot.

I just noticed that I also have a var/downloads folder which has 17,579 empty folders, which are all names consisting of five numbers.



I haven’t checked all 17,579 of these folders but the ones I have checked appear to be empty. Does anyone know what these folders are?

In 2.0.x, the /var/downloads folder contains the files available for download. The folder are named by the product_id. Deleting files in the admin area does not delete the enclosing folder. I reported this here:

[url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=998[/url]



Bob

[quote name=‘snorocket’]FTP to …/public_html/new_store/var/cache/ and delete everything in the cache folder - Sno[/QUOTE]



That did it thanks

[quote name=‘jobosales’]In 2.0.x, the /var/downloads folder contains the files available for download.[/QUOTE]



As they all seem to be empty folders, I presume it is safe to manually delete them.

[quote name=‘Lyn’]As they all seem to be empty folders, I presume it is safe to manually delete them.[/QUOTE]

It is safe to delete any empty folder (at least in v 2). If a folder has anything in it, then your customer would have problems in their Downloads area.



It’s really too bad that the cart does not do the proper housekeeping when removing the last file attached to a product.



Bob

But I don’t sell downloadable stuff. The only thing I can think of is that these folders have something to do with when I import and export my product list as the latest times seem to coincide with me doing this. I have a lot more products than the number of empty folders there but the numbers do match up with some of the product ids, and the latest product id has the same number as the last product I added (which I did by importing a .csv file).

Not sure, Lyn. The import/export files should be found in /var/exim.



What version are you running?



Bob

I’m still on 1.3.5 SP4. I had a play around with version 2 when I set up a site for a friend but there are too many issues with it for me to upgrade yet. When I do, I will be doing a clean install and starting from scratch.



The only files I have in var/exim are the Google base files I have exported.

Lyn-



Anything I export (orders, products or users) ends up in /var/exim in v2. Thought this was also true in the1.3.x branch but, honestly, just do not recall.



Not sure why you would have all those folders in downloads. Is it possible that at some point you had information in a wrong column while doing a product import? I am just guessing that might be an issue but I don’t know for fact. At any rate, deleting those folders should not create any problems but try it with one or two just to make sure.



Bob

Hi Bob,



It is possible at some stage when first importing products that I had something in the incorrect column. However, the last folder is dated only a couple of days ago when I imported the last lot of products I added, and the last folder number is also the same as the product id for the last product I imported, so that doesn’t explain that.



Just one of those things I suppose …



I will try deleting the lot but will back them up to my local computer first just in case one or more of them does have anything in it (yes, I’m paranoid I will “break” something!!).

[quote name=‘Lyn’]I will try deleting the lot but will back them up to my local computer first just in case one or more of them does have anything in it (yes, I’m paranoid I will “break” something!!).[/QUOTE]

You and I are alike - we both have an healthy appreciation for Murphy’s Law. The only reason I feel comfortable playing around is that I backup everything before I start my tinkering.



Bob

Yes, and believe it or not I even backed up my cache before deleting it yesterday … not that I didn’t trust you or believe you or anything but I just wanted to make sure!!



Also checked with my host that they had everything backed up.



One day I will be more confident but there’s no harm in making sure, especially when this is all fairly new to me.



I am certain there are a lot of people who wish they had done the same at some stage or another.

Hello



Is there a way to clear the cache from the admin and not FTP? or anyway to disable the cache, as we are finding it slows us down alot and only way to remove it so far , is to log in via FTP!..



thank you