Yes and that makes the implementation nice, simple and clean. But I do fear that it may be confusing to have the monad-like Cached thing explicitly wrap the query. But maybe that's a price worth paying for the clean implementation.