Clearing cache?

Is there a command to clear the cache from the front end? What about from the admin section? Or is it only possible through ftp?



can we turn OFF the caching?

You can do it a couple of ways. The easiest is to enter https://www.your_site.com/admin.php&cc into your browser. To make it even easier next time, save that in your Favorites/Bookmarks and/or add it to the “Quick menu”.



You can also delete the files /var/cache/ and /var/compiled/ via ftp or your file manager.



As far as turning off cacheing, I doubt it.

[quote name=‘Tool Outfitters’]You can do it a couple of ways. The easiest is to enter https://www.your_site.com/admin.php&cc into your browser. To make it even easier next time, save that in your Favorites/Bookmarks and/or add it to the “Quick menu”.



You can also delete the files /var/cache/ and /var/compiled/ via ftp or your file manager.



As far as turning off cacheing, I doubt it.[/QUOTE]

That’s actually www.yoursite.com/admin.php[COLOR=“Red”]?[/COLOR]cc. I know this because I just made the same mistake last week.



You can play with the settings below to see how they affect speed. In /config.local.php, find:

// Tweaks
$config['tweaks'] = array (
'js_compression' => false, // enables compession to reduce size of javascript files
'check_templates' => true, // disables templates checking to improve template engine speed
'inline_compilation' => true, // compiles nested templates in one file
);




Bob

I did not know that Bob. I was just relaying what we were told in the beginning. I usually delete them manually.



Have you tried any of the tweaks? If so, what kind of results did you have?

[quote name=‘Tool Outfitters’]I did not know that Bob. I was just relaying what we were told in the beginning. I usually delete them manually.[/QUOTE]

It got me too. The ‘&cc’ works when appended to a URL which already includes a ‘?dispatch’. From the admin home, you just use ‘?cc’.


[QUOTE]Have you tried any of the tweaks? If so, what kind of results did you have?[/QUOTE]

I have not tried yet. Who’s gonna go first? :slight_smile:



It is interesting that they do not have JS compression enabled by default.



There are additional settings in the /lib/templater/Smarty.class.php for the courageous. I am puzzled because of this:

/**
* This enables template caching.
*


    *
  • 0 = no caching

  • *
  • 1 = use class cache_lifetime value

  • *
  • 2 = use cache_lifetime in cache file

  • *

* @var integer
*/
var $caching = 0;




This seems to imply that Smarty is not caching its templates.



Bob

Interesting indeed. I really don’t need to play with it…mine loads in under a second already. :smiley: Mind you, I do not have a lot of the addons installed but I have about 600 categories with a little over 19,000 products.



Edit: 536 categories and 19162 products to be exact.

and for dummies why and when do we need to clear the cache ?

[quote name=‘Page’]and for dummies why and when do we need to clear the cache ?[/QUOTE]



well… today… i tried to log onto the site as well as the admin panel… and the site refused to load. I checked my ftp and there were over 12,000 files in the /var/cache folder. I cleared it, and the site worked perfectly again.

After putting www.yoursite.com/admin.php?cc. into the browser am I right in thinking i should just be getting a 404 error displaying but the work on clearing the cache has been done.

[quote name=‘Page’]After putting www.yoursite.com/admin.php?cc. into the browser am I right in thinking i should just be getting a 404 error displaying but the work on clearing the cache has been done.[/QUOTE]

You should be returned to the Admin Dashboard. Have you renamed your admin.php?



I am not sure if the files are cleared or not when you get the 404. You can check by using your FTP client to see if /var/compiled/customer exists - it should not exist if you check immediately after clearing cache and before visiting the storefront.



Bob

You should be returned only if your Admin is admin.php :wink: and not somethingelse.php

[quote name=‘Noman’]You should be returned only if your Admin is admin.php :wink: and not somethingelse.php[/QUOTE]

My admin.php is renamed and I am still returned to the the same URL in 2.0.12.



Bob

I just put a link in my quick links box. The link I put was:


http://www.my-domain.com/my-admin.php?dispatch=categories.manage&cc



This just brings me back to my categories page each time I clear the cache.



Brandon

[quote name=‘jobosales’]You should be returned to the Admin Dashboard. Have you renamed your admin.php?



Bob[/QUOTE]



Doh - :oops: