docs: public void cmsEvent(org.opencms.main.CmsEvent event) {
  
          if (!isEnabled()) {
              return;
          }
  
          switch (event.getType()) {
              case I_CmsEventListener.EVENT_PUBLISH_PROJECT:
                  if (LOG.isDebugEnabled()) {
                      LOG.debug("FlexCache: Received event PUBLISH_PROJECT");
                  }
                  String publishIdStr = (String)(event.getData().get(I_CmsEventListener.KEY_PUBLISHID));
                  if (!CmsUUID.isValidUUID(publishIdStr)) {
                      clear();
                  } else {
                      try {
                          CmsUUID publishId = new CmsUUID(publishIdStr);
                          List<CmsPublishedResource> publishedResources = m_cmsObject.readPublishedResources(publishId);
                          boolean updateConfiguration = false;
                          for (CmsPublishedResource res : publishedResources) {
                              if (res.getRootPath().equals(CONFIG_PATH)) {
                                  updateConfiguration = true;
                                  break;
                              }
                          }
                          CmsFlexBucketConfiguration bucketConfig = m_bucketConfiguration;
                          if (updateConfiguration) {
                              LOG.info("Flex bucket configuration was updated, re-initializing configuration...");
                              try {
                                  m_bucketConfiguration = CmsFlexBucketConfiguration.loadFromVfsFile(
                                      m_cmsObject,
                                      CONFIG_PATH);
                              } catch (CmsException e) {
                                  LOG.error(e.getLocalizedMessage(), e);
                              }
                              // Make sure no entries built for the old configuration remain in the cache
                              clear();
                          } else if (bucketConfig != null) {
                              boolean bucketClearOk = clearBucketsForPublishList(
                                  bucketConfig,
                                  publishId,
                                  publishedResources);
                              if (!bucketClearOk) {
                                  clear();
                              }
                          } else {
                              clear();
                          }
  
                      } catch (CmsException e1) {
                          LOG.error(e1.getLocalizedMessage(), e1);
                          clear();
                      }
                  }
                  break;
              case I_CmsEventListener.EVENT_CLEAR_CACHES:
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_RECEIVED_EVENT_CLEAR_CACHE_0));
                  }
                  clear();
                  break;
              case I_CmsEventListener.EVENT_FLEX_PURGE_JSP_REPOSITORY:
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_RECEIVED_EVENT_PURGE_REPOSITORY_0));
                  }
                  purgeJspRepository();
                  break;
              case I_CmsEventListener.EVENT_FLEX_CACHE_CLEAR:
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(
                          Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_RECEIVED_EVENT_CLEAR_CACHE_PARTIALLY_0));
                  }
                  Map<String, ?> m = event.getData();
                  if (m == null) {
                      break;
                  }
                  Integer it = null;
                  try {
                      it = (Integer)m.get(CACHE_ACTION);
                  } catch (Exception e) {
                      // it will be null
                  }
                  if (it == null) {
                      break;
                  }
                  int i = it.intValue();
                  switch (i) {
                      case CLEAR_ALL:
                          clear();
                          break;
                      case CLEAR_ENTRIES:
                          clearEntries();
                          break;
                      case CLEAR_ONLINE_ALL:
                          clearOnline();
                          break;
                      case CLEAR_ONLINE_ENTRIES:
                          clearOnlineEntries();
                          break;
                      case CLEAR_OFFLINE_ALL:
                          clearOffline();
                          break;
                      case CLEAR_OFFLINE_ENTRIES:
                          clearOfflineEntries();
                          break;
                      default:
                          // no operation
                  }
                  break;
              default:
                  // no operation
          }
      }