note 76772 modified in ref.apc by danbrown

From: Date: Thu, 18 Feb 2010 14:25:21 +0000
Subject: note 76772 modified in ref.apc by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166125@lists.php.net to get a copy of this message
Keep in mind to always prefix or suffix your cache key names with something specific to your site/app/setup, to avoid the risk of your apc cache entries being overwritten/deleted/modified by someone else on the same server. Assume we have some code like this: <?php apc_store('config', $cfg); ?> Now assume someone else on the same server is also using 'config' as the key passed to an apc_store(), apc_delete() (etc.) call in some other piece of code on the whole server. Since you're both working on the exact same cache entry, all sorts of wierd things can happen, but the problem is not in your code at all. --was-- Keep in mind to always prefix or suffix your cache key names with something specific to your site/app/setup, to avoid the risk of your apc cache entries being overwritten/deleted/modified by someone else on the same server. Assume we have some code like this: apc_store('config', $cfg); Now assume someone else on the same server is also using 'config' as the key passed to an apc_store(), apc_delete() (etc.) call in some other piece of code on the whole server. Since you're both working on the exact same cache entry, all sorts of wierd things can happen, but the problem is not in your code at all. http://php.net/manual/en/ref.apc.php

« previous php.notes (#166125) next »