This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Ian Jones
Ian Jones

I'm experiencing heavy caching of templates and CSS, which is making development difficult and sporadic with changes. Is there any way to change this?

sercanvirlan
sercanvirlan

There is a "enableAssetCache" option in cms config file. Try it to change false.

Ian Jones
Ian Jones

sercanvirlan Thanks for your reply. Unfortunately that doesn't seem to be the culprit and is already set to false by default.

Maybe something else in the chain is caching heavily?

Daniel81
Daniel81

Try php artisan cache:clear

Ian Jones
Ian Jones

daniel81 Thanks, sadly I'm running MAMP Pro locally and it doesn't have the php mcrypt extension to run artisan. Any other way to trigger this?

Daniel81
Daniel81

@Ian Jones, I'm running MAMP locally also, wonder how come the mcrypt extension isn't working? What version of MAMP & PHP are you running?

Daniel81
Daniel81

@Ian Jones, just remembered, I had this issue with the php artisan command at first also. I think it's something to do with the MAMP apache being over-ridden by the system apache.

I think to fix it, just paste export PATH=/Applications/MAMP/bin/php/php5.X.X/bin:$PATH into the .bash_profile file in your user root, and that should fix the issue.

Ian Jones
Ian Jones

daniel81 Yes that might explain it, running 2.1.4. Either going to have to upgrade or take the plunge and learn Vagrant I guess.

Daniel81
Daniel81

@Ian Jones, give the export workaround above a try, it worked for me, don't think there's anything wrong with your MAMP, just a clashing of apache that's all.

Last updated

Ian Jones
Ian Jones

daniel81 I did this, created the .bash_profile but I'm guessing I need to restart my machine for it to work?

Daniel81
Daniel81

@Ian Jones, try it, or just try restarting terminal, stop & start Apache again, and restart MAMP. You did change the X's in the path to your version of PHP didn't you? #justChecking ;)

Daniel81
Daniel81

@Ian Jones, this is the fix I followed, if it doesn't work there maybe something else on there you can try

Ian Jones
Ian Jones

daniel81 I managed to get artisan working, thanks! I cleared the cache and changes updated. I'm not 100% sure this didn't do it on it's own, but I'll check later.

Ian Jones
Ian Jones

Ok confirmed, Twig or App cache appears to be the culprit. Maybe a development mode config item can be added to force re-cache each load?

Last updated

Daniel81
Daniel81

@Ian Jones have you got cache set in MAMP? Try setting that to off

Ian Jones
Ian Jones

daniel81 No cache is enabled in MAMP. I'm finding that php artisan cache:clear is the only reliable method for me. It's also a pain to run constantly. I wonder if gulp.js can execute this somehow?

that0n3guy
that0n3guy

for gulp: https://www.npmjs.org/package/gulp-exec or https://www.npmjs.org/package/gulp-shell... I've not used either one.

You could also setup a crontab/(or windows alternative) to do it... though you'd probably forget you set it up later :)... I know I would.

gtf21
gtf21

Did anyone find a good solution to this. It seems that Twig is caching all the template files (which is a pain for development) but I don't know how to turn that off.

Daniel81
Daniel81

Yeah I've noticed this over last couple of weeks, didn't used to for me, but have had to start editing my files in Sublime as when editing in CMS, the changes aren't reflected

gtf21
gtf21

I'm actually editing in an external editor, and the changes are only sometimes reflected.

1-20 of 32

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.