`public class InterceptorChain {

private final List interceptors = new ArrayList<>();

//When the same proxy object is called multiple times, the object returned each time is the same result. Can I cache proxy objects and final objects with key value pairs? public Object pluginAll(Object target) { for (Interceptor interceptor : interceptors) { target = interceptor.plugin(target); } return target; }

public void addInterceptor(Interceptor interceptor) { interceptors.add(interceptor); }

public List getInterceptors() { return Collections.unmodifiableList(interceptors); }

} `

Comment From: harawata

Hello @sunyongfengchina ,

Could you explain why do you want to do it? Caching consumes memory, so it's not "free" like some people think.

There also is another possibly related request #1993 if you are interested.

Comment From: harawata

Closing as there is no response.

FYI : https://github.com/mybatis/mybatis-3/issues/1993#issuecomment-2711532188