Difference between apc_add and apc_store?

I do not see in the PHP docs:

http://www.php.net/manual/en/function.apc-store.php

http://www.php.net/manual/en/function.apc-add.php

Am I missing something? When should I use each of them?

And why are there two definitions of usage: one returns true and returns an array?

+7
source share
1 answer

So the docs say apc_store makes Cache a variable in the data store and apc_add makes Caches a variable in the data store, only if it not already stored. . Pay attention to the last part - "only if it has not yet been saved. Therefore, apc_store simply overwrites the already saved values.

The second part is an array with errors.

Returns TRUE on success or FALSE on failure. The second syntax returns an array with error keys.

+8
source

All Articles