Static cache & media content

Author Message

Seb Jallot

Thursday 07 June 2007 5:51:17 am

Hi,

I'm setting up a static cache export, and I'm very surprise that URL like /content/download/1/2/blablab.jpg are never cached...
because as a result none of the linked content (images, flash, pdf...) are statically cached !
Does someone who has experience with this functionality can help ?
thanks

Seb

Mark Marsiglio

Thursday 07 June 2007 6:05:21 am

The static cache export is a function that precompiles the pages that would otherwise be dynamically generated by PHP.

Images, documents, and other media files are not processed by the server through PHP, they are just delivered like the static HTML pages are, and therefore don't need to be static cached.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Seb Jallot

Thursday 07 June 2007 6:27:29 am

That's what I expected, but a link like this one :

http://xxxxxxx/content/download/230/1539/version/1/file/def+resto+1.mpg

Is PHP processed...

André R.

Thursday 07 June 2007 7:13:27 am

You can create your url using ezroot in the template instead to create a direct link to the file in the var folder. Just remember that as other static cache no user permission is checked.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Seb Jallot

Thursday 07 June 2007 7:16:31 am

That's probably the best solution...
Does anyone knows where I can hack the "attribute_view_gui" of file/images.. ? That would help !
Thanks anyway.

André R.

Thursday 07 June 2007 7:29:40 am

Don't hack it, override it :)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 21:11:11
Script start
Timing: Jan 18 2025 21:11:11
Module start 'layout'
Timing: Jan 18 2025 21:11:11
Module start 'content'
Timing: Jan 18 2025 21:11:13
Module end 'content'
Timing: Jan 18 2025 21:11:13
Script end

Main resources:

Total runtime1.8922 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.9141152.6250
Module start 'layout' 0.00490.0041 740.539139.4453
Module start 'content' 0.00901.8818 779.9844608.3594
Module end 'content' 1.89090.0013 1,388.343816.1641
Script end 1.8921  1,404.5078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.1725160.0002
Check MTime0.00140.0750160.0001
Mysql Total
Database connection0.00060.031810.0006
Mysqli_queries1.827396.5744680.0269
Looping result0.00080.0441660.0000
Template Total1.848097.720.9240
Template load0.00210.112320.0011
Template processing1.845997.553220.9229
Template load and register function0.00030.013610.0003
states
state_id_array0.00180.092610.0018
state_identifier_array0.00200.106620.0010
Override
Cache load0.00180.0956270.0001
Sytem overhead
Fetch class attribute can translate value0.00100.054030.0003
Fetch class attribute name0.00160.084280.0002
XML
Image XML parsing0.00120.063430.0004
class_abstraction
Instantiating content class attribute0.00000.001090.0000
General
dbfile0.00100.0519220.0000
String conversion0.00000.000440.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs