本文整理匯總了PHP中Zend_Cache_Core::getIds方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Cache_Core::getIds方法的具體用法?PHP Zend_Cache_Core::getIds怎麽用?PHP Zend_Cache_Core::getIds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Cache_Core
的用法示例。
在下文中一共展示了Zend_Cache_Core::getIds方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: removeByPartialId
/**
* @param $id
* @return bool|int
*/
public function removeByPartialId($id)
{
if (is_object($this->_cache)) {
$counter = 0;
$cacheIds = $this->_cache->getIds();
foreach ($cacheIds as $cid) {
if (strpos($cid, $id) !== false) {
$this->_cache->remove($cid);
$counter++;
}
}
return $counter;
}
return false;
}
示例2: testCleanAnyMatchingTag
/**
* @group tags
*/
public function testCleanAnyMatchingTag()
{
$this->setKeys();
$this->cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('tag_a1', 'tag_a3'));
$ids = $this->cache->getIds();
sort($ids);
$this->assertEquals(array('test_ccc'), $ids);
}
示例3: _getCacheKeys
/**
* Fetch an array of all keys stored in cache
*
* @return array Returns the array of cache keys
*/
protected function _getCacheKeys()
{
$ids = $this->_cache->getIds();
$prefix = $this->getPrefix();
$length = strlen($prefix);
foreach ($ids as $key => $id) {
$ids[$key] = substr($id, $length);
}
return $ids;
}
示例4: getPageItemCache
/**
* Returns the page item cache.
*
* @return array
*/
public function getPageItemCache()
{
$data = array();
if ($this->_cacheEnabled()) {
foreach (self::$_cache->getIds() as $id) {
if (strpos($id, self::CACHE_TAG_PREFIX) !== false) {
if (preg_match('|' . self::CACHE_TAG_PREFIX . "(\\d+)_.*|", $id, $page)) {
$data[$page[1]] = self::$_cache->load($this->_getCacheId($page[1]));
}
}
}
}
return $data;
}
示例5: hasSiteinfo
public function hasSiteinfo($suffix)
{
$ids = self::$_cache->getIds();
}