private DecoratedCache < K , V > findDecoratedCache ( Cache < K , V > cache ) { if ( cache instanceof AbstractDelegatingCache ) { if ( cache instanceof DecoratedCache ) { return ( ( DecoratedCache < K , V > ) cache ) ; } return findDecoratedCache ( ( ( AbstractDelegatingCache < K , V > ) cache ) . getDelegate ( ) ) ; } return null ; }
Finds the first decorated cache if there are delegates surrounding it otherwise null