private boolean allIdentity ( Class < ? extends Encoder > keyEncoderClass , Class < ? extends Encoder > valueEncoderClass , Class < ? extends Wrapper > keyWrapperClass , Class < ? extends Wrapper > valueWrapperClass ) { return keyEncoderClass == IdentityEncoder . class && valueEncoderClass == IdentityEncoder . class && keyWrapperClass == IdentityWrapper . class && valueWrapperClass == IdentityWrapper . class ; }
If encoders and wrappers are all identity we should just return the normal cache and avoid all wrappings