From b24d1b736a15981c2ecce20287a89eb960f3b507 Mon Sep 17 00:00:00 2001 From: Sean Coates Date: Sat, 3 Mar 2007 01:17:35 +0000 Subject: [PATCH] apc_add git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@231052 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/apc/functions/apc-add.xml | 139 ++++++++++++++++++++++++++ reference/apc/functions/apc-store.xml | 3 +- 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 reference/apc/functions/apc-add.xml diff --git a/reference/apc/functions/apc-add.xml b/reference/apc/functions/apc-add.xml new file mode 100644 index 0000000000..6f156f8581 --- /dev/null +++ b/reference/apc/functions/apc-add.xml @@ -0,0 +1,139 @@ + + + + + apc_add + + Cache a variable in the data store (only if it's not stored) + + + + &reftitle.description; + + boolapc_add + stringkey + mixedvar + intttl + + + + + Unlike many other mechanisms in PHP, variables stored using + apc_add will persist between requests (until the + value is removed from the cache). + + + + + &reftitle.parameters; + + + + key + + + Store the variable using this name. keys are + cache-unique, so attempting to use apc_add to + store data with a key that already exists will not overwrite the + existing data, and will instead return &false;. (This is the only + difference between apc_add and + apc_store.) + + + + + var + + + The variable to store + + + + + ttl + + + Time To Live; store var in the cache for + ttl seconds. After the + ttl has passed, the stored variable will be + expunged from the cache (on the next request). If no ttl + is supplied (or if the ttl is + 0), the value will persist until it is removed from + the cache manually, or otherwise fails to exist in the cache (clear, + restart, etc.). + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + A <function>apc_add</function> example + + +]]> + + &example.outputs; + + + + + + + + + &reftitle.seealso; + + + apc_store + apc_fetch + apc_delete + + + + + + + diff --git a/reference/apc/functions/apc-store.xml b/reference/apc/functions/apc-store.xml index aa41d73248..e5ffc098b7 100644 --- a/reference/apc/functions/apc-store.xml +++ b/reference/apc/functions/apc-store.xml @@ -1,5 +1,5 @@ - + apc_store @@ -99,6 +99,7 @@ string(3) "BAR" &reftitle.seealso; + apc_add apc_fetch apc_delete