For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > August 2004 > Multiple caching with different cache lifetime at one page









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Multiple caching with different cache lifetime at one page
Zoran Knezevic

2004-08-27, 4:00 pm

Hi all,

Well I have seen technical note in the manual:

Technical Note: If you want to give certain templates their own cache lifetime, you could do
this by setting $caching = 2, then set $cache_lifetime to a unique value just before calling
display() or fetch().

Is it possible to set $cache_lifetime dinamicaly on the template for example pseudo code:

index.tpl
----------------------------------------------
// set $cache_lifetime = 10000;
{include file="header.tpl" }
// set $cache_lifetime = 30;
{include file="banner.tpl" }
// set $cache_lifetime = 1800 + $randommnes;
{include file="content.tpl" }
// set $cache_lifetime = 10000;
{include file="footer.tpl" }
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com