caching

Author Message

Rami Grossman

Monday 14 June 2004 10:28:58 am

can someone please explain me the meaning and usage of keys on the cache-block function?
I read about it on the documentation but the explanation there is very short

thanks a lot
Rami

Alex Jones

Tuesday 15 June 2004 6:20:39 am

The keys in a cache-block ensure that the contents of the cache-block are stored and named in a manner that is unique, so one cache-block won't overwrite another. Does that help?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Rami Grossman

Saturday 19 June 2004 7:58:33 pm

Thanks a lot Alex, this was very helpful

Marco Zinn

Sunday 20 June 2004 1:27:55 pm

My 2 cents, as i also had problems with this term:
The key(s) of a cache-block are used to uniquely identify, create and use that cache block, depending on the value of the cache block.

Example 1: You have a cache block, which should be cached individually for each user (User information or so). So, you would use the user ID as cache blocks key.
Example 2: You have a cache block, which should be cached individually for each webpage (Navigation and page path). So, you would use the URL as cache blocks key.
Example 3: You have a cache block, which should be cached individually for each website and for each role combination (role-depending Navigation and page path). So, you would use the URL and the role ID array as cache blocks keys.

Note:
The number of cache blocks created as files in the filesystem depends on the possible value combinations of all keys of that cache block:
For example 1: If you have 2000 users, you would get up to 2000 cache blocks
For example 2: If you have 10.000 webpages (different URLs), you would get up to 10.000 cache blocks
For example 3: If you have 2.000 users and 10.000 webpages (different URLs), you would get up to 2.000 x 10.000 = 20.000.000 cache blocks, as the cache block key is a combination of the two keys.

It would be nice, if some ezCrew member or ez Guru would tell us, if this is really true ;)

Marco
http://www.hyperroad-design.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 08:04:26
Script start
Timing: Jan 31 2025 08:04:26
Module start 'layout'
Timing: Jan 31 2025 08:04:26
Module start 'content'
Timing: Jan 31 2025 08:04:26
Module end 'content'
Timing: Jan 31 2025 08:04:26
Script end

Main resources:

Total runtime0.0298 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9766151.1797
Module start 'layout' 0.00540.0027 739.156336.5781
Module start 'content' 0.00810.0201 775.734494.0625
Module end 'content' 0.02820.0016 869.796933.9922
Script end 0.0298  903.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00258.4953140.0002
Check MTime0.00113.7936140.0001
Mysql Total
Database connection0.00092.869610.0009
Mysqli_queries0.00309.899830.0010
Looping result0.00000.040010.0000
Template Total0.00113.610.0011
Template load0.00092.983910.0009
Template processing0.00020.627510.0002
Override
Cache load0.00062.148610.0006
General
dbfile0.009030.049480.0011
String conversion0.00000.024040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs