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

michalgallovic
michalgallovic

I'm editing in Sublime and had to switch back to inCMS editing, because of assets caching ... did anybody solved this ? also php artisan cache:clear does not work for me.

Mohsin
Mohsin

Same issue here as well. In addition to removing browser cache, running php artisan cache:clear and deleting the following folders

/site/storage/cms/cache
/site/storage/cms/combiner
/site/storage/cms/twig
/site/storage/framework/cache

It's annoying even to develop themes because assets don't update on refresh

richp10
richp10

I had a bit of a headache tracking down caching - had forgotten I had opcache enabled. Turning this off allowed instant refresh..

techroller
techroller

I hate to be the "me too" guy but for some reason my css files are being minified as well. Oddly, this wasn't the case yesterday. I have executed php artisan cach:clear command and have verified that the settings in app.php are as follows: 'debug' => true

and in cms.config I have: 'enableAssetCache' => false 'enableAssetMinify' => false

I even took @richp10's adivce and disabled opcache in php.ini to no avail.

I am running a very minorly tweaked instance of homestead (Vagrant) so I have full control over the environment.

Thanks!

Last updated

humpback
humpback

Hi I am playing around with themes, less files and currently suspect I'm having this problem. Was there any good solution since then?

I tried @mohsin solution by deleting those folders but it doesn't seem to work. Thanks

Last updated

Mohsin
Mohsin

Actually mine was not a solution. I merely said I deleted those files as well but it still didn't work. :P Guess I wasn't descriptive enough.

Last updated

humpback
humpback

Haha so there's no solution for this yet? I tried php artisan command too, it doesn't work on localhost using MAMP

cydrick.nonog
cydrick.nonog

you can archive this by doing this.

step 1: delete all files inside the folder "storage/framework/cache" step 2: open the file "config/cms.php" step 3: set the value of "urlCacheTtl" to 0, set the value of "parsedPageCacheTTL" to 0 step 4: save the file.

Your done.

Mohsin
Mohsin

This is not solved at all. I tested your suggestion of changing urlCacheTtl and parsedPageCacheTTL and it doesn’t help. In fact I made an interesting observation today. In my production server, I deleted main.css and tried loading the website. Surprisingly it was still able to serve the file. So now each time, I have to either make the git push and wait for couple of hours to see the change or change the file name as main_new.css and upload the file with that name.

KiwiMatenga
KiwiMatenga

I have also had this problem, but I just found a fix for it for OctoberCMS version 309. It appears that October does its own custom template caching, and it is handled at modules/cms/classes/Router.php:129:

                if (($page = Page::loadCached($this->theme, $fileName)) === null) {

If you want to disable template caching altogether, you can easily change line 129 to this:

                if (($page = Page::load($this->theme, $fileName)) === null) {

and it will always load the file directly from its source. However, if you want to attach template caching to the debug setting in the OctoberCMS config, you could use this instead:

                if ((Config::get('app.debug', false) ? ($page = Page::load($this->theme, $fileName)) : ($page = Page::loadCached($this->theme, $fileName))) === null) {

Last updated

Mohsin
Mohsin

^ This code should be a part of october core.

KiwiMatenga
KiwiMatenga

I'll do better than that. Apparently, the caching system is well implemented and updates when a file is changed, but it sends the wrong signals to Twig. Specifically, October tells Twig that a specific file has changed before Twig can use that information, and then when it can, October had already moved on and claims the file hasn't changed yet. Solution: continue to tell Twig a file has changed until Twig actually sees it. This fix is way larger than that ^, but works with/without the debug setting and keeps caching enabled.

Last updated

21-32 of 32

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