add support for providing a custom cache key

this is especially useful when URLs associated with
an object change (e.g. due to expiration).