Forums / General / cache life for external file
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...