public void removeCache ( final String nameOrAlias ) { final Cache cache = cacheMap . get ( nameOrAlias ) ; if ( cache == null ) { return ; } final SSMCache ssmCache = ( SSMCache ) cache ; if ( ssmCache . isRegisterAliases ( ) ) { ssmCache . getCache ( ) . getAliases ( ) . forEach ( this :: unregisterCache ) ; } unregisterCache ( nameOrAlias ) ; unregisterCache ( cache . getName ( ) ) ; caches . removeIf ( c -> c . getName ( ) . equals ( cache . getName ( ) ) ) ; }
Removes given cache and related aliases .