public MethodConfig setCache(Boolean cache) {
        this.cache = cache;
        return this;
    }
Sets validation.

@param validation the validation
core/api/src/main/java/com/alipay/sofa/rpc/config/MethodConfig.java