当前位置: 首页>>代码示例>>PHP>>正文


PHP apcu_delete函数代码示例

本文整理汇总了PHP中apcu_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP apcu_delete函数的具体用法?PHP apcu_delete怎么用?PHP apcu_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了apcu_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doDelete

 /**
  * {@inheritdoc}
  */
 protected function doDelete(array $ids)
 {
     foreach ($ids as $id) {
         apcu_delete($id);
     }
     return true;
 }
开发者ID:Elsensee,项目名称:symfony,代码行数:10,代码来源:ApcuAdapter.php

示例2: deleteKey

 /**
  * Delete a key from the cache pool
  *
  * @param $key
  *
  * @return bool
  */
 public function deleteKey($key)
 {
     if (function_exists('apcu_delete')) {
         return apcu_delete($key);
     }
     return apc_delete($key);
 }
开发者ID:packaged,项目名称:dal,代码行数:14,代码来源:ApcConnection.php

示例3: remove

 public function remove($key)
 {
     if ($this->apcu) {
         return apcu_delete((string) $key);
     }
     return apc_delete((string) $key);
 }
开发者ID:maslosoft,项目名称:cache,代码行数:7,代码来源:Apc.php

示例4: cleanup

 public function cleanup()
 {
     $regexp = self::CACHE_PREFIX . (empty($this->_config['store_prefix']) ? '' : $this->_config['store_prefix'] . ':');
     $regexp = preg_quote($regexp, '/');
     $to_be_deleted = new \APCuIterator("/^{$regexp}/", APC_ITER_VALUE);
     return apcu_delete($to_be_deleted);
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:7,代码来源:Apcu.php

示例5: deleteMultiple

 public function deleteMultiple(array $keys)
 {
     // The docs leave out the fact that apcu_delete() can take an array of keys,
     // when you provide an array of keys, it provides an array of errors (if any)
     // so the only successful case is no errors (empty array).
     $ret = apcu_delete($keys);
     return empty($ret);
 }
开发者ID:ifixit,项目名称:matryoshka,代码行数:8,代码来源:APCu.php

示例6: delete

 public function delete($name)
 {
     if ($this->hasAPCu) {
         apcu_delete($name);
     } else {
         unset($_SESSION[$name]);
     }
 }
开发者ID:xuedi,项目名称:pedetes,代码行数:8,代码来源:cache.php

示例7: delete

 /**
  * Delete a value from the cache
  *
  * @param  string                                         $key
  * @throws \Desarrolla2\Cache\Exception\ApcCacheException
  */
 public function delete($key)
 {
     if ($this->has($key)) {
         $tKey = $this->getKey($key);
         if (!($this->apcu ? \apcu_delete($tKey) : \apc_delete($tKey))) {
             throw new ApcCacheException('Error deleting data with the key "' . $key . '" from the APC cache.');
         }
     }
 }
开发者ID:gqfjob,项目名称:codeigniter-webmis,代码行数:15,代码来源:Apc.php

示例8: delete

 public static function delete($k)
 {
     if (function_exists('apc_delete')) {
         return apc_delete($k);
     } elseif (function_exists('apcu_delete')) {
         return apcu_delete($k);
     }
     return false;
 }
开发者ID:netroby,项目名称:crossapc,代码行数:9,代码来源:crossapc.php

示例9: remove

 public function remove($id)
 {
     $id = $this->_processId($id);
     $ret = true;
     if (php_sapi_name() == 'cli') {
         $ret = Kwf_Util_Apc::callClearCacheByCli(array('cacheIds' => $id));
     }
     return $ret && apcu_delete($id);
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:9,代码来源:Apcu.php

示例10: delete

 /**
  * {@inheritdoc}
  *
  * @return \Orno\Cache\Adapter\Apc
  */
 public function delete($key)
 {
     if ($this->apcu) {
         apcu_delete($key);
     } else {
         apc_delete($key);
     }
     return $this;
 }
开发者ID:orno,项目名称:cache,代码行数:14,代码来源:ApcAdapter.php

示例11: del

 public function del($key)
 {
     if (is_array($key)) {
         foreach ($key as $k) {
             apcu_delete($k);
         }
     } else {
         apcu_delete($key);
     }
 }
开发者ID:xiaoniainiu,项目名称:php-yaf-yk,代码行数:10,代码来源:cache.php

示例12: deleteArrayDataFromStorage

 /**
  * {@inheritdoc}
  */
 protected function deleteArrayDataFromStorage(array $keys)
 {
     $deleted = true;
     foreach ($keys as $key) {
         if (apcu_delete($key) === false) {
             $deleted = false;
         }
     }
     return $deleted;
 }
开发者ID:tlumx,项目名称:framework,代码行数:13,代码来源:ApcuCachePool.php

示例13: del

 /**
  * @inheritdoc
  */
 public function del($key, $fields)
 {
     if (is_string($fields)) {
         return (int) apcu_delete($this->getKeyByField($key, $fields));
     }
     $data = array_map(function ($field) use($key) {
         return (int) apcu_delete($this->getKeyByField($key, $field));
     }, $fields);
     $result = array_count_values($data);
     return empty($result[1]) ? 0 : $result[1];
 }
开发者ID:cheprasov,项目名称:php-parallel,代码行数:14,代码来源:ApcuStorage.php

示例14: clear

 public function clear($prefix = '')
 {
     $ns = $this->getPrefix() . $prefix;
     $ns = preg_quote($ns, '/');
     if (class_exists('\\APCIterator')) {
         $iter = new \APCIterator('user', '/^' . $ns . '/', APC_ITER_KEY);
     } else {
         $iter = new \APCUIterator('/^' . $ns . '/', APC_ITER_KEY);
     }
     return apcu_delete($iter);
 }
开发者ID:GitHubUser4234,项目名称:core,代码行数:11,代码来源:APCu.php

示例15: flush

 public function flush()
 {
     $this->_cache = array();
     $iterator = class_exists('\\APCUIterator') ? new \APCUIterator() : new \APCIterator('user');
     foreach ($iterator as $key => $value) {
         if ($this->_prefix === '' or strpos($key, $this->_prefix) === 0) {
             \apcu_delete($key);
         }
     }
     $iterator = null;
     return $this;
 }
开发者ID:boyxp,项目名称:bluefin-bak,代码行数:12,代码来源:apc.php


注:本文中的apcu_delete函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。