Skip to content

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

@danielbachhuber

Description

@danielbachhuber

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions