@ SuppressWarnings ( "unchecked" ) @ Override public SpringCache2kCache getCache ( final String name ) { return name2cache . computeIfAbsent ( name , n -> { if ( ! allowUnknownCache && ! configuredCacheNames . contains ( n ) ) { throw new IllegalArgumentException ( "Cache configuration missing for: " + n ) ; } return buildAndWrap ( Cache2kBuilder . forUnknownTypes ( ) . manager ( manager ) . name ( n ) ) ; } ) ; }
Returns an existing cache or retrieves and wraps a cache from cache2k .