Forums / General / caching

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

eZ debug

Timing: Jan 18 2025 22:34:24
Script start
Timing: Jan 18 2025 22:34:24
Module start 'content'
Timing: Jan 18 2025 22:34:24
Module end 'content'
Timing: Jan 18 2025 22:34:24
Script end

Main resources:

Total runtime0.0186 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 587.4688180.8672
Module start 'content' 0.00820.0053 768.335997.7578
Module end 'content' 0.01350.0050 866.093870.7031
Script end 0.0185  936.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002513.6043120.0002
Check MTime0.00116.0211120.0001
Mysql Total
Database connection0.00063.020210.0006
Mysqli_queries0.003719.877040.0009
Looping result0.00000.139920.0000
Template Total0.004725.210.0047
Template load0.00095.113710.0009
Template processing0.003720.010510.0037
Override
Cache load0.00073.736410.0007
General
dbfile0.00052.5864100.0000
String conversion0.00000.043630.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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