code: public void clearCache(String cacheName) {
          Cache cache = this.cacheManager.getCache(cacheName);
          if (null != cache && Status.STATUS_ALIVE.equals(cache.getStatus())) {
              cache.removeAll();
              logger.warn("finished removeAll for cache: " + cacheName);
          }
      }
docs: Call {@link Cache#removeAll()} on the specified cache, if it exists and is alive.
  
  @see Status#STATUS_ALIVE
  @see Cache#getStatus()
  @param cacheName