我在PHP文档中没有看到任何内容:
http://www.php.net/manual/en/function.apc-store.php
http://www.php.net/manual/en/function.apc-add.php
我在这里遗漏了什么吗?我什么时候应该使用每一个?
为什么有两个用法定义,一个回复为true,一个返回数组?
答案 0 :(得分:8)
因此,文档说apc_store执行Cache a variable in the data store
而apc_add执行Caches a variable in the data store, only if it's not already stored.
。注意最后一部分 - “只有它尚未存储。所以apc_store只是覆盖已存储的现有值。
第二部分是一个有错误的数组。
成功时返回TRUE,失败时返回FALSE。第二种语法返回带有错误键的数组。