Cache system

Permalink
Hi all,

I would like to discuss about the actual cache system.
(I've already readhttp://www.concrete5.org/documentation/using-concrete5/dashboard/sy... )

1/ BASIC CACHE
"The Basic Cache allows blocks to be cached based on their default settings" => Ok but does it mean Block Record AND Block Output OR only Block Record ?

2/ FULL PAGE CACHING - IF BLOCK ALLOW IT
a - Does it mean that a page is fully cache only if ALL blocks in this page have their cache settings equal to TRUE ?

b - OR Does it mean that a page is fully cache excluding blocks which have their settings equal to FALSE ?

c - Which Block setting are considered : Record, Output, both ?

d - Normally, you need to cache a full page OR NOT, so does it make a really sense to have this cache setting available ? Have you some example when we need to use that ?

e.g. only one page in my website have all its blocks cache setting setted to TRUE. I make some changes on this page page type (e.g new html structure or new css/js integration). All changes are considered in all pages with this page type except for this page which is full cached. So I still need to clear the whole website cache only for this page ! In addition, I must know that this page is cached !

I think Cache setting must be more simple : I want a full page caching OR not. That's all. What do you think about that ?

3/ NEW CACHE MANAGEMENT : PAGE SPECIFIC CLEAR
It could be great if we can have a "clear cache" button for each page.
This make sense because if I don't want to clear the cache of the whole website but just a specific page.

That's all :) lol

Thank you
Best,
moosh

moosh
 
mkly replied on at Permalink Reply
mkly
1. from what i understand block record caching pretty much happens no matter what. Block output(the view.php stuff) is what this setting is really about.

2.
a) yup
b) false is default
c) Anything in the context of view, again don't worry about record
d) Possibly permissions type stuff. Like if a block needs to show something different based on whether you are logged in or not. Also, maybe a block that shows a form and should cache every time besides when it's form is submitted.

A lot of blocks/addons really suck at proper cache settings, that really isn't c5's fault.
moosh replied on at Permalink Reply
moosh
1/ Ok. Yes Doc about cache is not very clear about that. So, as you say, Block Record is independent of Cache settings ? Cache settings are only used for view stuff ?


Yes, blocks/addons not implement very well cache settings.

I know is not c5's fault but I think C5 must find a way to improve that.
moosh replied on at Permalink Reply
moosh
As I see in block model file, Block use ADOdb_Active_Record to map and reduce/cache queries if $btCacheBlockRecord is enabled, right ?
moosh replied on at Permalink Reply
moosh
Another super question, have you an example for Cache Lifetime ?

I have no idea when it can be use... Because for me when you make change, you need to clear cache.. no sense to automate this...

This only applies for external caching mechanisms, for example your browser cache ?

Thank you
moosh replied on at Permalink Reply
moosh
Little up ! :)
mkly replied on at Permalink Reply
mkly
Cache Lifetime applies to situations where you don't want the block to check to see if data is updated every time the page loads. An example might be if you are getting some data via an external api and you only want that to check for new info every 30 minutes for site performance. Or sometimes you know the data won't change very often and you want to only check once a day.