cache life for external file

Author Message

risto CMS user

Monday 28 November 2005 4:13:57 pm

I have this in a template

			
{'http://www.domain.net/file.php'|file_get_contents}

now file.php generates %d-%m-%Y.txt (30-11-2005.txt)

my problem is that the cache for it lives to long.
so I made a chage in the pemplate to:

			{cache-block expiry='0'}
{'http://www.domain.net/file.php'|file_get_contents}
{/cache-block}

but it seems I'm not dooing it right. if I delete the file of the day. I still get the contents without the file.

Can someone explaing how i can set the expiry ofor this code/content?

Nathan Kelly

Tuesday 29 November 2005 3:26:37 pm

Hi risto, you could try:

{set-block scope=root variable=cache_ttl}0{/set-block}
{'http://www.domain.net/file.php\'|file_get_contents}

I'm not sure if this works for external information but if you place:

{set-block scope=root variable=cache_ttl}0{/set-block}

at the top of a template the system won't cache the page. Might help?

Cheers!

Pardon me while I burst into flames...

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

Main resources:

Total runtime0.0238 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.0069 590.2813152.6250
Module start 'layout' 0.00690.0044 742.906339.4453
Module start 'content' 0.01130.0102 782.351689.4141
Module end 'content' 0.02150.0023 871.765630.3047
Script end 0.0237  902.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002711.4279140.0002
Check MTime0.00114.7296140.0001
Mysql Total
Database connection0.00104.345510.0010
Mysqli_queries0.002811.903330.0009
Looping result0.00000.080210.0000
Template Total0.00177.110.0017
Template load0.00093.655510.0009
Template processing0.00083.432910.0008
Override
Cache load0.00062.545310.0006
General
dbfile0.00031.148380.0000
String conversion0.00000.058240.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