Re: [Case Closed - Idiot Found Behind Keyboard] Re: [PHP] APC - problems with CLI & odd return values from apc_clear_cache()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 29 July 2006 05:47, Jochem Maas wrote:
> Jon Anderson wrote:
> > Just replying to the list on this one 'cause I'm pretty sure you're on
> > it. :-)
> >
> > AFAIK, with many caches the web server cache and CLI caches are
> > exclusive to each process. The APC manual seems to suggest that the CLI
> > cache is not connected to the web server cache:
> >
> > From: http://ca.php.net/manual/en/ref.apc.php
> >
> > apc.enable_cli *integer*
> > <http://ca.php.net/manual/en/language.types.integer.php>
> >
> >    Mostly for testing and debugging. Setting this enables APC for the
> >    CLI version of PHP. Normally you wouldn't want to create, populate
> >    and tear down the APC cache on every CLI request, but for various
> >    test scenarios it is handy to be able to enable APC for the CLI
> >    version of APC easily.
>
> thanks, you are right - what I thought had been working all this time had
> not, or atleast the code did work but it was clearing the cache belonging
> to the CLI, which was a pointless act!
>
> I'm an idiot.
>
> but wanting to clear the webservers APC cache from a cmdline script doesn't
> seem like such a stupid thing to want to do. but there is no nice way of
> doing it; so now I do this at the end of my cmdline script instead:
>
> exec('apachectl -k graceful');
>
> which sucks in so many ways it hurts .... but it does clear the APC cache

You could create a script that basically just does apc_clear_cache() et all. 
and call it from lynx, curl, wget, etc. and throw that into a cron job.  That 
would technically get you to call the script from the cli, but it should 
clear the webserver cache. 

Ray

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux