Reply to Re: [SMARTY] URL query driven cache groups

Your name:

Reply:


Posted by Monte Ohrt on 10/05/81 11:29

That would be a function/behavior of your application. You could extend
Smarty and make a custom display() function that does these tests then
calls the parent display() function accordingly.

Erik Schmitt wrote:

>Hello,
>
>I want to define cache groups by a function that analyses the
>URL query. Some pages are to be cached but some are not.
>
>
>Example:
>
>page=user.home -> YES, cache it, it's static
>page=search.results -> NO, it delivers dynamic content
>
>My idea is to use a smarty-attribute that tells smarty
>whether to cache the current page or not.
>
>
>Example:
>
>$m_cacheId = getCacheId();
>$m_smarty->display('index.tpl', $m_cacheId);
>
>... and inside smarty:
>
>if($m_cacheId == $smarty.NO_CACHE)
> .... do not cache
>else
> .... cache with respect to $m_cacheId (say "a|b|c")
>
>
>
>Would this be an interesting feature for smarty in general?
>At the moment this sounds promising to me.
>Has anyone tried something like this?
>
>
>- Erik
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация