RE: [SMARTY] Cache cleanup

From: Date: Fri, 14 Jun 2002 18:34:33 +0000
Subject: RE: [SMARTY] Cache cleanup
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4865@lists.php.net to get a copy of this message
M Mohr wrote: >On Fri, Jun 14, 2002 at 12:14:17PM -0500, Gary Loescher wrote: >> What if we serialize the Smarty object to a file? >i would prefer using register_shut_down_function() . the gc-function >would then be called after the connection to the client is closed, so >the end-user will not recognize any big performance hits and all can >be done in one script. only one gc at a time can be ensured via simple >flock. How does the function get called after the client connection is closed? I think that the connection stays open until the PHP process ends (Could be wrong here, though). There might be a way to tweak it with a buffer flush, though...although people might wonder why their browser is still downloading when all content is onscreen already. I'm not worried about more than one gc, but the case when Smarty tries to access the cache for page rendering purposes while gc is occurring. If the cache is locked, would there still be a wait time or would Smarty create another cache file automatically (Monte?) >my experience showed, that calling php from php via system() can >be very ugly to debug and you have to patch some environment >variables to prevent some (IMHO undocumented) cgi-magic to call the >calling script instead the one passed at the command line. You're right, it's not pretty at all. Do you know of a good way to fork a process in PHP? Or some other way to start a background process? Of course, if there's a way to close the client connection and keep the script processing, that would be a good solution. Gary

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