allow CacheKey objects also in regex based methods.