Re: [SMARTY] RE: Deleting a specific cache id from a different smarty instance
| From: | M Mohr | Date: | Sat, 25 Jan 2003 21:17:10 +0000 |
| Subject: | Re: [SMARTY] RE: Deleting a specific cache id from a different smarty instance | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7337@lists.php.net to get a copy of this message | ||
On Sat, Jan 25, 2003 at 01:53:44PM -0700, Hoffman, Geoffrey wrote:
> Are curl and wget Smarty-specific, or straight PHP?
no they are command-line-tools to act as a web-browser and fetch a
webpage. some people use 'lynx -dump ...' for the same job, i think.
you can trigger a php-script or any other cgi-script to run on a
web-server from your crontab. in your case
12 0 * * * curl [url-to-flush-cache.php]
> Never heard of those.
>
> You bring up an interesting situation...
> How could you tell if someone was in that millisecond?
uh, that is a wide topic, and maybe not smarty-related enough for this
list. for mutually exclusive file-access in php see
http://www.php.net/flock . I have to admit i did not look at
the code
of smarties clear_all_cache() et al. how the problem is solved there.
> MM> definitely :) use a smarty cli- or cgi-binary
> MM> for that or fetch a url of a php script that
> MM> flushes the cache. you can use curl or wget for
> MM> that.
> MM>
> MM> the simplest way would be of course to 'rm -r'
> MM> the cache directory,
> MM> but then no file-locking against other
> MM> php-script using the cache is
> MM> done and you may accidently delete
> MM> a page in the (milli-)second another
> MM> process wants to display it.
>
> GH>> Now I just realized that in my publication
> GH>> system, I'm going to need to trash
> GH>> all the summary-display section
> GH>> cache at 12:01 am on each day.
> GH>> Should I use CRON for that?
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php