implement CacheInvalidator invalidate and invalidateRegex