code: private Bucket getCachedBucket(final String name) {
          Bucket cachedBucket = bucketCache.get(name);
  
          if(cachedBucket != null) {
              if (cachedBucket.isClosed()) {
                  LOGGER.debug("Not returning cached bucket \"{}\", because it is closed.", name);
                  bucketCache.remove(name);
              } else {
                  LOGGER.debug("Returning still open, cached bucket \"{}\"", name);
                  return cachedBucket;
              }
          }
  
          return null;
      }
docs: Helper method to get a bucket instead of opening it if it is cached already.
  
  @param name the name of the bucket
  @return the cached bucket if found, null if not.