Forums / General / cache life for external file

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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...