Re: [SMARTY-DEV] Changed cache_lifetime-handling and added expiration date
| From: | Norbert Röcher | Date: | Fri, 12 Apr 2002 19:46:12 +0000 |
| Subject: | Re: [SMARTY-DEV] Changed cache_lifetime-handling and added expiration date | ||
| References: | 1 2 3 4 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-60@lists.php.net to get a copy of this message | ||
"Monte Ohrt" <monte@ispi.net> schrieb im Newsbeitrag
news:3CB73EBF.2050609@ispi.net...
> At the same time, I want to try to avoid adding any more
> user-configurable variables unless absolutely necessary. We probably
> just need to decide, for what reasons is each situation useful or
makes
> better sense?
>
> The question:
>
> Should cached files each have their own expiration time, or should
they
> just follow the "global" cache_lifetime value? Normally this wouldn't
> make any difference, since cache_lifetime doesn't change. If you are
> dynamically changing your cache_lifetime, then it will matter... does
> the cache file follow the lifetime that was originally in place when
the
> cache was generated, or use the global one?
Since smarty is thought as a support-engine for dynamic sites a dynamic
cache handling is just logical, i think.
> I could see some uses where you want to give different pages their
own
> cache lifetime, they could be set when calling them. Example for a
new
> feature:
>
> $smarty->display('index.html', $cache_id, $my_cache_lifetime);
I don't care about the WAY to get an expiration time. I just care about
the ability to get it and to use it for a check with
"$this->is_cached". So, any solution for this will would find my
agreement. :-)) But this one seems to be placed wrong, because it can't
be checked by "$this->is_cached". Or am i wrong?
> In this case, index.html will respect the value of $my_cache_lifetime
> and this value would be stored along with the template. If you don't
> supply the value, then $smarty->cache_lifetime is used by default.
>
> Thoughts?
I believe you're a kind of too mindful. New versions got new features
and must not always be full compatible to older versions. Coding for
downcompatibility costs coders time and new versions' performance. Of
course these are just my personal thoughts...
But anyway, I can't see the benefit of another "lifetime". This would
only have the need to recalculate the expiration. In any case it should
be the full expiration time.
What do you think?
Regards,
Norbert