array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'class.apcuiterator.php', 1 => 'APCUIterator', ), 'up' => array ( 0 => 'book.apcu.php', 1 => 'APCu', ), 'prev' => array ( 0 => 'function.apcu-store.php', 1 => 'apcu_store', ), 'next' => array ( 0 => 'apcuiterator.construct.php', 1 => 'APCUIterator::__construct', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/apcu/apcuiterator.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.apcuiterator.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL apcu >= 5.0.0)
APCUIterator 类可以更轻松的迭代大型 APCu 缓存。 它所支持的逐步迭代功能对于遍历大型缓存非常有用,每次加锁后只会获取指定数量(默认 100 条)的缓存条目就会释放锁而非一直锁住整个缓存,以便其他活动对缓存进行操作。 此外,使用正则表达式匹配是更高效的,因为它已经被移到了 C 语言层级(C level)。