Skip to content

[Cache] Fixed Memcached adapter doClear()to call flush() #29436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2018
Merged

[Cache] Fixed Memcached adapter doClear()to call flush() #29436

merged 1 commit into from
Dec 6, 2018

Conversation

raitocz
Copy link
Contributor

@raitocz raitocz commented Dec 3, 2018

Q A
Branch? 4.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29435
License MIT
Doc PR symfony/symfony-docs

MemcachedTrait now calls Memcached::flush via its client instead of just returning false.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Dec 3, 2018

Flushing clears completely the Memcache server, while clear should only affect the very items that are in one logical pool (ie same key prefix). Invalidation works already by using an incrementing version number as prefix.

@raitocz
Copy link
Contributor Author

raitocz commented Dec 3, 2018

@nicolas-grekas But if you pass option to not use versioning?

$adapter = new MemcachedAdapter($client, $namespace);
$adapter->enableVersioning(false);

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Dec 3, 2018
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

To be merged on 3.4. If you want to rebase+retarget please do, otherwise we can do it while merging.

@raitocz
Copy link
Contributor Author

raitocz commented Dec 6, 2018

@nicolas-grekas How long it will take before it gets merged? Thx

@nicolas-grekas nicolas-grekas changed the base branch from master to 3.4 December 6, 2018 10:55
@nicolas-grekas
Copy link
Member

Thank you @raitocz.

@nicolas-grekas nicolas-grekas merged commit 447baac into symfony:3.4 Dec 6, 2018
nicolas-grekas added a commit that referenced this pull request Dec 6, 2018
…raitocz)

This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #29436).

Discussion
----------

[Cache] Fixed Memcached adapter doClear()to call flush()

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29435
| License       | MIT
| Doc PR        | symfony/symfony-docs

MemcachedTrait now calls Memcached::flush via its client instead of just returning false.

Commits
-------

447baac [Cache] Fixed Memcached adapter doClear()to call flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants