Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
I have "Read further..." section on almost every couch-enabled page of my website with <cms:pages order="random" limit="4"> tag. I didn't realize for a very long time why the load of my site increased so drastically that I needed to upgrade from shared hosting to VPS.
Now it was time to do some maintenance and I noticed that CouchCMS doesn't use cache. It turned out it is a completely undocumented "feature", which disables caching for every page where order="random" is present. Well, I don't want or need that and it was very frustrating!
Caching is extremely important for pages to load faster, I don't want to ever disable it.
I've fixed it for myself by commenting out line 2564 (might differ in later versions, I have modded my CouchCMS, so I don't upgrade it otten).
The line is " $PAGE->no_cache=1;".

"О, сколько нам открытий чудных
Готовит просвещенья дух
И опыт - сын ошибок трудных,
И гений - парадоксов друг,
И случай - бог-изобретатель..."


The most intimate interpretation (for our english-speaking colleagues) by @pranava as -

How many blissful revelations
The spirit of enlightment hides!
And then experience born of lapses
And genius antinomy-wise
And chance, the heavenly inventor...

P.S. You may be pissed-off by that cache thing (as it feels from your post), @eklipse, but it's okay. We don't know what we don't know (yet)
:D

No, actually it's NOT okay, because this "feature" is actually a bug, since is completely undocumented and in my case caused very severe load on my website.

Well, I mean it's okay to be angry :) I deliberately did not discuss the issue, because it's KK's area of expertise.

I knew about it, and now you know about it as well. I suggest to either familiarize yourself with source code (raw PHP) of every tag and feature that you use or delegate coding to someone who has done it before you, because any code works reliably only for those who know its pivots.

The issue itself is a delicate one, in my opinion. Random order is either all the times random for each visitor (cache off) or random only once and becomes static and the same for all visitors (cache on). Who decides?

If you enable 'cache' in config and don't care to know when it works and when it doesn't (logged users, for instance) you will be irritated many more times and it is not healthy. I seriously wish you stay calm and healthy and live a happy life.
4 posts Page 1 of 1