add cachedBy, like cached but adds a key

re-factored to a base implementation with
no Yesod dependencies in TypeCache.hs
TypeCache typo and module exposure
Merge pull request #831 from yesodweb/cachedBy

add cachedBy, like cached but adds a key