RE: new snapshot - new fetch functionality

From: Date: Thu, 14 Mar 2002 18:15:03 +0000
Subject: RE: new snapshot - new fetch functionality
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3062@lists.php.net to get a copy of this message
I was thinking... Can every smarty functions have a element that control the cache? Like: Never Cache: {function assign="..." var=".." ... nocache} Allways cache: {function assign="..." var=".."} Everytime compiler found a nocache parameter inside a function, it will output again the -- {function assign="..." var=".." ... nocache} --, to compiled template. Designers will have total control of what function will be cached and what will not be cached. Although, {insert} cant be depressed because the programmers can write nocache specific functions that designers cant call without use {insert} caller, and they will not use a function that need be non-cached with cache. For example, I use {insert name="cms" module="some_module" function="some_function" vars...} to everything in my CMS, instead, we could use {cms module="some_module" function="some_function" vars... nocache}. Someone whants this insert plugin? I guess it's usefull... So, {fetch nocache}, will never be cached. The same to {counter start=$smarty.get.start nocache}. Special usefull to: {news userid=$smarty.get.userid news_id=$smarty.get.id nocache} too. Monte, the permoformace use will be too high with nocache parameter? Atenciosamente, ---------------------------------------- Roberto Bertó Under Development http://www.under.com.br Tel: 51 32270599 Cel: 51 91169628 ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: <smarty@lists.ispi.net> Cc: <smarty@lists.ispi.net> Sent: Thursday, March 14, 2002 12:50 AM Subject: [smarty] RE: new snapshot - new fetch functionality > Actually we already have that routine written for a client, I'll look it > up. They fetch the weather but don't want it fetched on every hit, just > every 30 minutes. > > Jimmy Harlindong wrote: > > > > Oh yes that would be much cleaner, I agree. > > > > OK here's another idea.... can the fetch be cached, and say either > > refresh the fetch only when there's new document (using http expire or > > date?) or only refetch at a certain time and at other time use the > > cache? It'd be useful if I want to fetch a news site say every 3 hours > > or every 9 am in the morning (barring any time difference) > > > > I think I can write the extraction routine as a custom function or > > better yet if the *extracted* data can be cached as well.... oh well > > ideas ideas :) > > > > cheers > > > > > -----Original Message----- > > > From: Monte Ohrt [mailto:monte@ispi.net] > > > Sent: Thursday, 14 March 2002 1:03 PM > > > To: Jimmy Harlindong > > > Cc: smarty@lists.ispi.net > > > Subject: Re: [smarty] RE: new snapshot - new fetch functionality > > > > > > > > > like what? strip out the links, or strip out the html tags? > > > > > > Maybe that should be another function or modifier, so you can > > > use it for > > > any text. > > > > > > {fetch file=$url assign="contents"} > > > > > > {$contents|extract_links} > > > {$contents|strip_html_tags} > > > > > > Jimmy Harlindong wrote: > > > > > > > > Monte, > > > > > > > > This is great, and maybe you can also add the function to > > > let us filter > > > > / extract certain parts of the fetched document too? > > > > > > > > Cheers > > > > Jimmy > > --- > You are currently subscribed to smarty as: roberto@berto.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ > >

« previous php.smarty.general (#3062) next »