Objective
- #2190723: Add a KeyValueStore\FileStorage to replace e.g. ConfigStorage discovered the need for being able to check whether a key/value store has a key (without retrieving the value).
- Such a method can be easily supported by any key/value store — worst case implementation is to actually get the key and check whether it has a value.
Proposed solution
- Add a new
has()method toKeyValueStoreInterface.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | kv.has_.1.patch | 5.8 KB | sun |
Comments
Comment #1
sunComment #2
Crell commentedSeems reasonable unless the bot disagrees.
Comment #3
tim.plunkettI just wtf'd really hard when I went to use this and it didn't work.
+1
I even went ahead and wrote a draft change notice, just in case anyone was using this and wondering about the absence of has():
https://drupal.org/node/2217597
Comment #4
tim.plunkettOh and this blocks the KV entity storage I'm working on.
Comment #5
tim.plunkettComment #6
sun1: kv.has_.1.patch queued for re-testing.
Comment #7
webchickSeems reasonable.
Committed and pushed to 8.x. Thanks!