public void removeCacheEntriesForAuthenticationToken(String authenticationToken)
      throws Exception {
    if (enabled) {
      try {

        if (StringUtils.isNotBlank(authenticationToken)) {
          logger.debug(
              "All query results for authentication token {} will be removed", authenticationToken);

          Cache cache = cmsRepositoryCache.getCache();

          Node rootNode = cache.getRoot();

          if (rootNode.hasChild(JCR_QUERY_NODE_FQN)) {

            // Get all regions under this node. For each region search
            // for node named after authentication token and remove it
            Set<Node> cacheRegions = rootNode.getChild(JCR_QUERY_NODE_FQN).getChildren();

            if (CollectionUtils.isNotEmpty(cacheRegions)) {

              for (Iterator<Node> iter = cacheRegions.iterator(); iter.hasNext(); ) {
                Node cacheRegion = iter.next();

                if (cacheRegion.hasChild(authenticationToken)) {

                  if (logger.isDebugEnabled()) {
                    logger.debug(
                        "Removing results cached under node {}",
                        cacheRegion.getChild(authenticationToken).getFqn());
                  }

                  cacheRegion.removeChild(authenticationToken);
                }
              }
            }
          }
        } else {
          logger.debug("Authentication token is null or empty. Nothing will be removed from cache");
        }
      } catch (Exception e) {
        if (propagateExceptions) throw e;
        else {
          logger.error("Exception in cache ", e);
        }
      }
    }
  }