Re: Solution for Caching and URL query string
| From: | and-is Uwe Regenbogen | Date: | Sun, 29 Jul 2001 16:40:54 +0000 |
| Subject: | Re: Solution for Caching and URL query string | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1292@lists.php.net to get a copy of this message | ||
Thank you Hans-Peter!
but after having a close look to the fetch() function in smarty_class.php
I'm using the cache_id which is an optional second parameter for this
function. I'm simply creating a SCRIPT_URI plus QUERY_STRING plus
HTTP_POST_VARS plus browser-name plus language (which defaults to the user's
accepted language).
After that it's easy:
$smarty -> display ( "template_name" , "my_simple_cache_id" );
the cache file is now unique by template_name, query-string, post-vars and
browser.
Hope this is usefull for someone.
Uwe Regenbogen
----- Original Message -----
From: Hans-Peter Oeri <ikkampfcaspar@oeri.ch>
To: Uwe Regenbogen <uwe@and-is.de>
Cc: <smarty@lists.ispi.net>
Sent: Sunday, July 29, 2001 2:45 PM
Subject: Re: [smarty] Caching and URL query string
> Hi!
>
> Quoting and-is Uwe Regenbogen <uwe@and-is.de>:
>
> > Question:
> > -is the URL's query string part of the caching logic?
> > -are the HTTP_POST_VARS part of the caching logic?
>
> > I've tried it several times but as soon as I switch caching ON all the
> > previous / next page links show me the results I've already seen.
>
> With that, you give the answer yourself. No, nothing besides a different
> cache_id, a cache clear or a cache timeout interferes with caching.
>
> The notable difference are inserted templates that are never cached. That
> means, you could simply "insert" the variable part of the page.
>
> Don't conform!
> IkKampfCaspar75
>
>