This is not the most elegant code -- in fact, it's pretty awful. However, this code means this issue is fixed automatically for the user. The alternative is to require the user to explicitly define the complete interceptor stack for their cache (which is a PITA and very error-prone, and the interceptor stack is dependent upon the configuration).

IOW, I think this is the lesser of two evils. Note that all of the other ISPN-version-specific code is in this same method.