本文整理汇总了PHP中Zend_Cache::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Cache::remove方法的具体用法?PHP Zend_Cache::remove怎么用?PHP Zend_Cache::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Cache
的用法示例。
在下文中一共展示了Zend_Cache::remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rest_request
/**
* Makes an API call given a call name and arguments checkout
* http://developers.sugarcrm.com/documentation.php for documentation on the
* specific API calls
*
* @param string $call_name the API call name
* @param array $call_arguments the arguments for the API call
* @return array
*/
private function rest_request($call_name, $call_arguments)
{
if (!$this->logged_in && $call_name != 'login') {
try {
if (!$this->connect()) {
return array();
}
} catch (\Exception $e) {
throw $e;
}
$call_arguments['session'] = $this->session;
}
$request = $this->getCurl();
$request->addData(array('method' => $call_name, 'input_type' => 'JSON', 'response_type' => 'JSON', 'rest_data' => json_encode($call_arguments)));
if ($call_name == 'set_entry') {
$request->addHeaders(array('Expect' => ' '));
}
$output = $request->post();
$response_data = json_decode(html_entity_decode($output['body']), true);
if (isset($response_data['number']) && $response_data['number'] == 11 && $this->cache) {
$this->cache->remove('suiteSession');
$this->logged_in = FALSE;
$response_data = $this->rest_request($call_name, $call_arguments);
}
return $response_data;
}
示例2: remove
/**
* Remove a cached item
*
* @param string $id Cache ID
* @return boolean
* @throws coding_exception
*/
public function remove($id)
{
if ($this->cache === false) {
return true;
}
try {
return $this->cache->remove($id);
} catch (Zend_Cache_Exception $e) {
throw new coding_exception('Zend Cache Error: ' . $e->getMessage());
}
}
示例3: remove
/**
* remove cache value by key & prefix
*
* @param string $key the key in the cache container
* @param string $prefix the prefix used for grouping
*
* @return mixed the value in the cache if success to unset, else false
*/
public function remove($key, $prefix = null)
{
$value = $this->get($key, $prefix);
if (!is_null($prefix)) {
$prevPrefix = $this->addPrefix($prefix);
}
if ($this->cache->remove($key) !== FALSE) {
return $value;
}
if (!is_null($prefix)) {
$this->setPrefix($prevPrefix);
}
return FALSE;
}
示例4: deleteMessage
/**
* Delete a message from the queue
*
* @param string $handle
* @return boolean
*/
public function deleteMessage($handle)
{
return $this->_cache->remove($handle);
}