Uniqueness of URLs in var/site_name/storage

Author Message

Peter Keung

Friday 25 March 2011 9:19:03 am

We have a client whose site sits behind an "origin pull" CDN ("origin pull" is where you don't have to upload your assets to the CDN, but where the CDN automatically downloads and stores your assets when pages are requested). We're looking at ways to optimize the CDN setup.

One potentially big optimization we've identified is for images and other files stored in var/site_name/storage. All images on the site are currently cached by the CDN for 1 day, which might make more sense for site design images hard-coded into templates and present in stylesheets. However, by my analysis, all files that sit under var/site_name/storage are versioned, with paths such as:

var/site_name/storage/images/media/images/matrix_public/1123-1-eng-US/matrix_public.jpg

That would mean that all paths under that folder contain unique assets, and that new assets are never uploaded to existing paths. If that's the case, we could cache everything under var/site_name/storage for something like 1 year, or essentially indefinitely.

Are there any exceptions under var/site_name/storage? Can we assume that each such URL contains content that is permanently at that URL?

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Peter Keung

Friday 25 March 2011 7:46:47 pm

Our investigations confirm that it is indeed the case that var/site_name/storage URLs are never re-used.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

André R.

Saturday 26 March 2011 4:35:18 am

See optional expires rules on the end of: http://doc.ez.no/eZ-Publish/Technical-manual/4.4/Installation/Virtual-host-setup
(added last fall)

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

Main resources:

Total runtime0.7489 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.1641152.6406
Module start 'layout' 0.00530.0035 741.804739.4844
Module start 'content' 0.00890.7386 781.2891549.3203
Module end 'content' 0.74740.0015 1,330.609412.1250
Script end 0.7489  1,342.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4281160.0002
Check MTime0.00120.1648160.0001
Mysql Total
Database connection0.00080.111110.0008
Mysqli_queries0.702293.7611570.0123
Looping result0.00050.0700550.0000
Template Total0.717695.820.3588
Template load0.00210.276820.0010
Template processing0.715595.535720.3577
Template load and register function0.00010.012310.0001
states
state_id_array0.00080.108910.0008
state_identifier_array0.00120.156520.0006
Override
Cache load0.00160.2193160.0001
Sytem overhead
Fetch class attribute can translate value0.00050.064820.0002
Fetch class attribute name0.00090.122150.0002
XML
Image XML parsing0.00100.129620.0005
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00090.1191240.0000
String conversion0.00000.001440.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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
1content/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: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs