docs: private boolean clearBucketsForPublishList(
          CmsFlexBucketConfiguration bucketConfig,
          CmsUUID publishId,
          List<CmsPublishedResource> publishedResources) {
  
          long startTime = System.currentTimeMillis();
          String p = "[" + publishId + "] "; // Prefix for log messages
          try {
  
              LOG.debug(p + "Trying bucket-based flex entry cleanup");
              if (bucketConfig.shouldClearAll(publishedResources)) {
                  LOG.info(p + "Clearing Flex cache completely based on Flex bucket configuration.");
                  return false;
              } else {
                  long totalEntries = 0;
                  long removedEntries = 0;
                  List<String> paths = Lists.newArrayList();
                  for (CmsPublishedResource pubRes : publishedResources) {
                      paths.add(pubRes.getRootPath());
                      LOG.info(p + "Published resource: " + pubRes.getRootPath());
                  }
                  BucketSet publishListBucketSet = bucketConfig.getBucketSet(paths);
                  if (LOG.isInfoEnabled()) {
                      LOG.info(p + "Flex cache buckets for publish list: " + publishListBucketSet.toString());
                  }
                  synchronized (this) {
                      List<CmsFlexCacheEntry> entriesToDelete = Lists.newArrayList();
                      for (Map.Entry<String, CmsFlexCacheVariation> entry : synchronizedCopyMap(m_keyCache).entrySet()) {
                          CmsFlexCacheVariation variation = entry.getValue();
                          if (LOG.isDebugEnabled()) {
                              LOG.debug(p + "Processing entries for " + entry.getKey());
                          }
                          entriesToDelete.clear();
  
                          for (Map.Entry<String, I_CmsLruCacheObject> variationEntry : synchronizedCopyMap(
                              variation.m_map).entrySet()) {
                              CmsFlexCacheEntry flexEntry = (CmsFlexCacheEntry)(variationEntry.getValue());
                              totalEntries += 1;
                              BucketSet entryBucketSet = flexEntry.getBucketSet();
                              if (publishListBucketSet.matchForDeletion(entryBucketSet)) {
                                  entriesToDelete.add(flexEntry);
                                  if (LOG.isInfoEnabled()) {
                                      LOG.info(p + "Match: " + variationEntry.getKey());
                                  }
                              } else {
                                  if (LOG.isDebugEnabled()) {
                                      LOG.debug(p + "No match: " + variationEntry.getKey());
                                  }
                              }
                          }
                          for (CmsFlexCacheEntry entryToDelete : entriesToDelete) {
                              m_variationCache.remove(entryToDelete);
                              removedEntries += 1;
                          }
                      }
                      long endTime = System.currentTimeMillis();
                      LOG.info(p
                          + "Removed "
                          + removedEntries
                          + " of "
                          + totalEntries
                          + " Flex cache entries, took "
                          + (endTime - startTime)
                          + " milliseconds");
                      return true;
                  }
              }
          } catch (Exception e) {
              LOG.error(p + "Exception while trying to selectively purge flex cache: " + e.getLocalizedMessage(), e);
              return false;
          }
      }