implement CacheInvalidator invalidate and invalidateRegex

fix #10