You are here: Re: [SMARTY] Re: how to disable caching? « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] Re: how to disable caching?

Posted by Monte Ohrt on 07/14/05 16:23

Matthew Weier O'Phinney wrote:

>* "Christopher J. Bottaro" <cjbottaro@alumni.cs.utexas.edu>:
>
>
>>I tried the following:
>>
>>$smarty = new Smarty();
>>$smarty->caching = false;
>>
>>but stuff is still being written to the compile_dir. It wouldn't be a
>>problem, but I'm editing my templates via a Samba share and the times are
>>synced between computers and thus Smarty isn't seeing my changes.
>>
>>
>
>Compiling != caching. Here's how Smarty operates when caching is off:
>
>* Checks to see if a compiled version of the template is available, and
> that it is newer than the template
> * Yes?
> * Loads the compiled code
> * Loads assigned variables, configurations
> * evals the compiled code
> * No?
> * Loads the template file
> * Compiles it into PHP code
> * Stores the compiled PHP code in the compile_dir
> * Loads assigned variables, configurations
> * evals the compiled code
>
>
>

Actually it includes/executes the compiled code, it doesn't eval it in
the PHP sense of eval().

>Template compiling is what makes Smarty fast on subsequent calls, and is
>a necessary step in the process. Caching is considered optional.
>
>If you're having problems with the timestamps, consider using NTP to set
>the clocks on your systems so that they're synchronized.
>
>
>

 

Navigation:

[Reply to this 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

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