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