[HTTPHeaderSettings] config

Author Message

Diego Barcia

Sunday 21 October 2007 12:06:08 pm

Regarding the Expires header, ¿how can the home page be identified?

See http://ez.no/developer/articles/ez_publish_performance_optimization_part_3_of_3_practical_cache_and_template_solutions/cacheable_headers
"Cacheable Headers" of "Practical Cache and Template Solutions"

I give a real world example but simple. There's a website that has three levels: the home page, sections that list articles, and the articles.

I want everything to expire in the future except listings (level 2) and specially the home page (level 1), which is the page that changes more often.

So I want that articles (level 3) return 172801 as an Expires. And listings (level 2), and specially the front page (level 1), return -7200.

172801 means 48 hours plus 1 second, which is (I read somewhere) the minimum value that YSlow, the Firebug optimization plugin, takes as a "good far future" Expires header.

Say the sections are /a/ and /b/. With this configuration, I've succeded in making eZ Publish to put negative Expires on section listings /a/ and /b/, and a positive Expires on the third level (the articles), and was yet amazed by ez Publish, once again! But the home page is still expiring in 48 hours from now, as the articles:

[HTTPHeaderSettings]
CustomHeader=enabled
Expires[]
Expires[/]=172801
Expires[/a]=-7200;0
Expires[/b]=-7200;0

I tried identifying the home page with a Expires[/content/view/full/2]=-7200, but it doesn't work. If anyone knows if this could be done.

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 19 2025 07:06:49
Script start
Timing: Jan 19 2025 07:06:49
Module start 'layout'
Timing: Jan 19 2025 07:06:49
Module start 'content'
Timing: Jan 19 2025 07:06:50
Module end 'content'
Timing: Jan 19 2025 07:06:50
Script end

Main resources:

Total runtime1.4108 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 589.1563152.6250
Module start 'layout' 0.00860.0038 741.781339.4453
Module start 'content' 0.01241.3969 781.2266407.5234
Module end 'content' 1.40930.0015 1,188.75008.1641
Script end 1.4108  1,196.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.2662160.0002
Check MTime0.00140.0975160.0001
Mysql Total
Database connection0.00140.095810.0014
Mysqli_queries1.364896.7386460.0297
Looping result0.00060.0406440.0000
Template Total1.350095.720.6750
Template load0.00260.187120.0013
Template processing1.347495.501520.6737
Template load and register function0.00020.015210.0002
states
state_id_array0.00290.205710.0029
state_identifier_array0.00390.274320.0019
Override
Cache load0.00220.1556180.0001
Sytem overhead
Fetch class attribute can translate value0.00060.043310.0006
Fetch class attribute name0.00140.098510.0014
XML
Image XML parsing0.00010.007710.0001
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00330.2340100.0003
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs