Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Clear Cache Doesn't Work Inside Admin Panel Rate Topic   - - - - -

 

Posted 24 March 2016 - 10:22 PM #1

Hi everyone.  So a previous issue brought me to the realization that my "Clear Cache" button inside my Admin Panel doesn't actually clear my var/cache/.  

 

It still gives me the notification letting me know that it "Successfully cleared the cache" but it really doesn't do anything.  I have to log in through my FTP to delete that folder.  

 

So this is some kind of permissions issue, but I don't know what/where to fix that.  Any advice?



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3842 posts

Posted 25 March 2016 - 01:49 AM #2

/config.local.php

// Default permissions for newly created files and directories
define('DEFAULT_FILE_PERMISSIONS', 0666);
define('DEFAULT_DIR_PERMISSIONS', 0777);


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 25 March 2016 - 03:22 AM #3

666 and 777 are not necessarily the right permissions.  The best thing is to check with your hosting company and determine what "mode" PHP runs in on your server and ask them what the correct (most secure) permissions should be and set those values in your config.local.php.  Then manually remove the var/cache directory and it's sub-folders and allow cs-cart to recreate them. 

 

In the vast majority of hosting environments, the permissions should be 755/644.  But check with your hosting.

 

If the cache becomes really large it might take a couple of attempts via admin panel to complete since the operation can time out and there's really no indication that it has succeeded or failed.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19775 posts

Posted 25 March 2016 - 08:21 AM #4

Note that this feature clears system cache, not templates one


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • screenimages
  • Senior Member
  • Members
  • Join Date: 17-Jul 14
  • 154 posts

Posted 17 April 2016 - 05:58 PM #5

&cc&ctpl?



 
  • FDGWEB
  • Junior Member
  • Authorized Reseller
  • Join Date: 20-Aug 10
  • 145 posts

Posted 22 April 2016 - 04:52 PM #6

You also have to check what the current permissions are on the caches now. If the web server cannot delete them .. then that is why.

 

755/644 are the correct permissions under suPHP ... so if you have modified your config you need to CHMOD the files to these permissions.

 

https://www.fdgweb.c...to-775-via-ssh/

 

Or .. CHOWN them if they are not owned correctly. Yo may have installed the cart under one user .. but every time a file is dynamically created, it is owned by Apache or a user that can or cannot R/W/X correctly.

 

Only after normalizing all permissions can you see if this is the issue.

 

Note - this seems to be the issue 99% of the time when people call us to help with the cache not clearing .. 


FDG Web, Inc - Seattle Web Design : Custom CS-Cart Programming & Design | Toll-Free: 877.239.3083

Download Proposal Templates & Web Design Contract Samples

 
  • KBM
  • Senior Member
  • Members
  • Join Date: 08-Dec 08
  • 252 posts

Posted 21 July 2016 - 04:15 AM #7

Our hosting company setup a cron job to clear the cache twice a day in public_html/var/cache. 

 

I hope this fixes the issue we experience as I hate the message "Oops there's a problem" when visiting our website. 

 

Hi everyone.  So a previous issue brought me to the realization that my "Clear Cache" button inside my Admin Panel doesn't actually clear my var/cache/.  

 

It still gives me the notification letting me know that it "Successfully cleared the cache" but it really doesn't do anything.  I have to log in through my FTP to delete that folder.  

 

So this is some kind of permissions issue, but I don't know what/where to fix that.  Any advice?


Version 4.3.9

 


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 21 July 2016 - 06:45 PM #8

Shouldn't be needed if your ownerships/permissions are setup properly.  Clearing the cache twice a day seems wasteful and it won't clear on other internal operations like when settings are changed, addons installed, etc.

 

You should fix the root-cause of the problem versus trying to band-aid it with a cron job.  There are tons of responses on ownership/permissions issues in this forum.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.