/** * Clear the page item cache. * * @param int $pageNumber * @return \Zend\Paginator\Paginator */ public function clearPageItemCache($pageNumber = null) { if (!$this->_cacheEnabled()) { return $this; } if (null === $pageNumber) { foreach (self::$_cache->getIdsMatchingTags(array($this->_getCacheInternalId())) as $id) { if (preg_match('|' . self::CACHE_TAG_PREFIX . "(\\d+)_.*|", $id, $page)) { self::$_cache->remove($this->_getCacheId($page[1])); } } } else { $cleanId = $this->_getCacheId($pageNumber); self::$_cache->remove($cleanId); } return $this; }