Is there a data-structure/model for storing a value at an arbitrary URI-based key, and then if null, backing down to a less specific path/domain? i.e.
SET example.com "hello"
SET a.example.com/foo "world"
GET example.com => "hello"
GET example.com/foo => "hello"
GET a.example.com/foo/bar => "world"
Value is simply a serialized JSON object; I don't need to do any list operations on it.
Currently, I'm using node.js/restify backed by redis (although I am open to other datastores). I realize I could have a flat key-value store, and loop through all subpaths/domains, but that feels inefficient with a dozen potentially empty calls to the datastore.