-
Notifications
You must be signed in to change notification settings - Fork 21
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
No obvious way to break the cache #3
Comments
Sadly, it's not missing from the documentation, it's just not part of the CacheBundle interface definition at the moment. Several useful pecl-memcache calls are missing (delete, add, replace), along with some lesser-used ones (flush, decrement, increment). Many pecl-memcached calls are also not implemented (append, prepend, cas, fetch, and more). Memcache doesn't appear to have direct support for clearing multiple entries by namespace or wildcard, so a generic interface like this would probably not be able to support that. The memcached documentation suggests a method of emulating namespaces by hand - unfortunately, it requires the "add" function. I hope to add support for delete, add, and replace in the near future. You're welcome to fork and try making the change and submitting a PR yourself, if you're interested in accelerating the implementation. |
Sorry I was slow to get back to you, and sorry I didn't check the code more closely before asking a stupid question! Unfortunately I'm not familiar with memcached, but have previously implemented the same feature with APC using APCIterator (http://php.net/manual/en/apciterator.construct.php). This allows you to pass a regex into the constuctor and iterate over cache entries that match the key (deleting them one at a time). Again not ideal, but it is possible. Redis on the other hand though the set data-type (http://redis.io/commands#set) allows this sort of thing easily, and there is a bundle for redis already (https://github.com/snc/SncRedisBundle) Is there anything in particular that has led you to start your own bundle (not criticizing, I'm just curious) instead of using https://github.com/KnpLabs/KnpZendCacheBundle for example? edit: and maybe change this issue to a feature request instead |
It's important to be able to break the cache by
and
I can't find any way to do either. Maybe just missing from the documentation?
The text was updated successfully, but these errors were encountered: