How to REALLY clear cache for development

Hi there,

I am a PHP developer and new to SugarCRM.

I have activated the Developer mode in the Admin panel + forced to empty my Firefox browser cache at pages reloading but still I cannot directly see the changes I am doing when reloading a page and mots of the time I have to reload the page several times to see the changes I did, which is very very annoying.

Is there a way to really get rid of this cache for development at each page reloading?

Thanks!
  • Hi Thomas,

    I usually use incognito browser mode. It eliminates the need to clean the cache


  • Hi folks,

    Sure to use the incognito mode of your browser eliminates the need to clear the browser's cache, but sugar has an own cache as well that sometimes needs to be cleared. 

    Admin > Repair > Quick Repair & Rebuild

    That flushs the sugar crm system cache and shall solve most issues with not recognised changes in the system. 

    Kind regards
  • I've been told that you can completely delete the cache directory in the base Sugar directory, but I've run into issues with that.  

    We run the following command while in the cache directory on a Linux system to remove files but leave the folder structure intact.
    find -type f -exec rm {} ';'

    We don't generally run into issues with this, but I wouldn't run it on a production system.
  • That's exactly what the Quick Repair does, isn't it?
  • Not sure.  I think QRR can leave some files and sometimes I don't want to run a QRR.
  • Yeah, know what ye mean. I had to learn that the QRR can kill some things it better did not, but only in our beta testing environments  (don't know why, even if it's  a 100% mirror of the staging system. But it solves all issues we ran in so far while modifying SugarCRM
  • Hi Thomas,

    The best way for this is:
    • Run Sugar on Incognito / Private browser
    • No need to enable the Developer Mode
    • Perform Quick Repair and Rebuild after each change
    • If you do not want to perform QRR then you need to clear complete cache folder from inside (remember empty cache folder should be there)
    • If you want to change anything in js files then you can make changes in 'cache/javascript/base/*.js'. it will directly reflect js changes on browser
    Good Luck!

    Rolustech: SugarCRM Engineering
    Website: www.rolustech.com
    Ph (US): +1 - 310 - 492 - 5564
    Ph (UK): +44 - 207 - 9938 - 524
    Email: info@rolustech.com
    Skype: rolustech
  • Many thanks to all. That would be great to have a real Developer Mode that indeed clears the cache at page reloading.