add cachedBy, like cached but adds a key

re-factored to a base implementation with
no Yesod dependencies in TypeCache.hs
Ok.