本文整理汇总了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();
}