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

wp_cache_delete_group() should return false when cache group doesn't exist #17

Open
danielbachhuber opened this issue Aug 24, 2016 · 0 comments
Labels

Comments

@danielbachhuber
Copy link
Member

When LCache is available, wp_cache_delete_group() currently always returns true, even when the group doesn't exist. It would be more correct for this function to return false when the group doesn't exist. However, this would require an API improvement to the LCache library.

daniel [12:40] when I call LCacheIntegrated->delete( LCacheAddress( 'foo', null ) );, I always get true, regardless of whether the bin exists
[12:41] Redis supports returning false when the hash doesn't exist
[12:41] does that seem possible to implement?
dts [12:42 PM] That's pretty hard to implement.
[12:42] There's no stable concept of a bin existing in LCache.
[12:42] What does a memcached cache for WP do?
[12:43](Which would have a similar issue, I'd imagine.)
danielbachhuber [12:43 PM] no group concept in memcached as far as I'm aware of
[12:43] everything ends up in memcached as key:group
dts [12:43 PM] Hmm. Is it a problem if we just do what we would do if the bin is assumed to exist?
danielbachhuber [12:44 PM] certainly not a huge problem
dts [12:44 PM] I mean, there's no operation to create a bin, so I'm not sure what would be necessary if, say, a bin didn't exist.
danielbachhuber [12:44 PM] I'll file an issue as a bug for now, and we can decide later whether it's wontfix

From #15

danielbachhuber added a commit that referenced this issue Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant