On 10/28/2012 04:54 AM, Terry Ellison wrote:

> From the perspective of a production sysadmin,  I've always just set
> apc.stat=0 but then cleared the cache following any change.  This gives
> the best of both worlds: the performance dividend of no stat'ing and
> avoiding the weird gremlins that sometimes occurred if I didn't flush
> the cache.  The one-off hit for repriming the cache again is pretty
> small and the "release from dev to live" cycle isn't a common event. 
> For a multi-app configuration, it would be a very simple matter to write
> an admin script which clears the cache based on some REGEX filename
> match, so that this could be integrated into application release scripts.

This causes deploy race conditions though. You want requests that are
already in progress right when the deploy happens to continue executing
with all the old versions of the scripts. The PHP realpath cache helps
here. If you clear out the opcode cache on the deploy you end up with
these requests all picking up the new version mid-request.

-Rasmus

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to