Forums / Setup & design / Static cache & media content

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