Template cache

Author Message

Mazen Alsibai

Thursday 13 October 2005 3:18:27 am

Hi:
what is the advantage and the disadvantage of setting TemplateCache=enabled ?
thanks

Nathan Kelly

Friday 14 October 2005 6:16:40 am

Hi, as far as I know setting template cache to "disabled" is good when developing your site. This means your template code is not cached thus each change you make to your templates during development will not require you to clear cache and the changes will be immediately obvious.

If template cache is "enabled" your template code is cached and compiled to reduce loading time from the server to the user. However if you make changes to your templates you won't see those changes until after you have cleared the cache.

Basically template caching reduces the processing time when a page loads, because templates don't change "dynamically" they can be compiled into a format that allows them to be loaded quickly.

If they weren't cached, each time a user accesses a page each template used would need to be processed and compiled on the fly, this would result in reduced server performance. You would notice this performance drop significantly on high traffic sites because each user that accesses the site would need the templates processed.

I hope this answers your question?

Cheers!

Pardon me while I burst into flames...

Mazen Alsibai

Saturday 15 October 2005 12:37:46 am

Hi:
that is exactly what i want to know
thanks

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 18 2025 19:14:23
Script start
Timing: Jan 18 2025 19:14:23
Module start 'layout'
Timing: Jan 18 2025 19:14:23
Module start 'content'
Timing: Jan 18 2025 19:14:23
Module end 'content'
Timing: Jan 18 2025 19:14:23
Script end

Main resources:

Total runtime0.0195 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.0080 589.2344152.6094
Module start 'layout' 0.00800.0039 741.843839.4063
Module start 'content' 0.01190.0051 781.250089.2813
Module end 'content' 0.01700.0024 870.531330.3047
Script end 0.0194  900.8359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002713.8568140.0002
Check MTime0.00115.8218140.0001
Mysql Total
Database connection0.00147.444710.0014
Mysqli_queries0.003819.327130.0013
Looping result0.00000.159210.0000
Template Total0.00178.710.0017
Template load0.00094.541810.0009
Template processing0.00084.151010.0008
Override
Cache load0.00063.128310.0006
General
dbfile0.00031.555680.0000
String conversion0.00000.061240.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