Skip to content
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

Add support for Clear Region for Memcached #104

Closed
themakshter opened this issue Nov 4, 2016 · 4 comments
Closed

Add support for Clear Region for Memcached #104

themakshter opened this issue Nov 4, 2016 · 4 comments
Assignees
Milestone

Comments

@themakshter
Copy link

Memcached does not support namespacing so we have to implement it ourselves. CacheManager does it via regions, but the ClearRegion method for memcached is not supported.

A potential solution to this might be something suggested by memcached team themselves or this approach.

@themakshter
Copy link
Author

Creating this issue in case I work on it later.

@MichaCo
Copy link
Owner

MichaCo commented Nov 6, 2016

Thanks @themakshter I will take a look at it soon :>

@MichaCo MichaCo added this to the Version 1.0 milestone Dec 3, 2016
@MichaCo MichaCo modified the milestones: Version 0.9.4, Version 1.0 Feb 11, 2017
@MichaCo MichaCo self-assigned this Feb 11, 2017
MichaCo added a commit that referenced this issue Feb 11, 2017
…#104.

Fixed custom transcoder to not care about non-object things.
Unix timestamp impl with benchmarks, for fun...
@MichaCo
Copy link
Owner

MichaCo commented Feb 11, 2017

@themakshter hey, I finally had some time to look into this. I first didn't really liked the implementation as it leaves existing keys still in the cache and they might never be removed.

But hey, better than not having anything I guess ^^

I had to implement the solution slightly more complex than your approach and decided to do it from scratch instead of merging your PR, sorry about that. But thanks for pushing the idea 👍

@themakshter
Copy link
Author

@MichaCo , that's perfectly fine, the PR was just a very basic solution, not meant to be added into the code - I had done that to get your thoughts on it.

That doesn't matter much anyway, what matters is that you found and wrote a good solution to the problem :D

As for the items never being removed, that is unlikely to happen. Memcached uses LRU to determine what to remove from it, so if those keys are never used again, they will eventually get removed. Link to memcached internals page

@MichaCo MichaCo modified the milestones: Version 1.0, Version 0.9.4 Mar 18, 2017
@MichaCo MichaCo closed this as completed Mar 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants