Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Remove hidden TaggableInterface dependencies from paginator #7181

Closed
wants to merge 1 commit into from

Conversation

hver
Copy link
Contributor

@hver hver commented Feb 3, 2015

This is an example for discussion on issue #7174 Cache in Paginator module supports only Memory and Filesystem adapters

$tags = static::$cache->getTags($key);
if ($tags && in_array($this->_getCacheInternalId(), $tags)) {
if (substr($key, 0, $prefixLength) == self::CACHE_TAG_PREFIX) {
static::$cache->removeItem($this->_getCacheId((int)substr($key, $prefixLength)));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works also with static::$cache->removeItem($key);. Is there a reason to do it this way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From reading the code, this ensures that the page number is properly injected into the key.

@hver hver changed the title Remov hidden TaggableInterface dependencies from paginator Remove hidden TaggableInterface dependencies from paginator Feb 3, 2015
@Ocramius Ocramius self-assigned this Feb 3, 2015
@Ocramius Ocramius added this to the 2.4.0 milestone Feb 3, 2015
@hver
Copy link
Contributor Author

hver commented Feb 4, 2015

I'm not sure, why the Travis build on PHP 5.4 fails on ZendTest\Cache\Storage\Adapter\FilesystemTest::testClearExpired. I have modified only Paginator and PaginatorTest, these changes should not affect Filesystem adapter.

@Ocramius
Copy link
Member

Ocramius commented Feb 4, 2015

Those tests are sadly time-bound, and tend to fail when the travis
infrastructure is stressed out.
On Feb 4, 2015 8:10 AM, "Hennadiy (Gena) Verkh" notifications@github.com
wrote:

I'm not sure, why the Travis build on PHP 5.4 fails on
ZendTest\Cache\Storage\Adapter\FilesystemTest::testClearExpired. I have
modified only Paginator and PaginatorTest, these changes should not
affect Filesystem adapter.


Reply to this email directly or view it on GitHub
#7181 (comment).

weierophinney added a commit that referenced this pull request Feb 25, 2015
Remove hidden TaggableInterface dependencies from paginator
weierophinney added a commit that referenced this pull request Feb 25, 2015
@weierophinney
Copy link
Member

Merged to develop for release with 2.4.

weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
…or-cache-interfaces

Remove hidden TaggableInterface dependencies from paginator
weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants