Add an encodedWith that will wrap a Cache with a Codec

I should really test this stuff at some point.