code: private <CONTENT extends CmsXmlContent> void removeCachedContent(CmsResource resource, Map<String, CONTENT> cache) {
  
          Iterator<Map.Entry<String, CONTENT>> iterator = cache.entrySet().iterator();
          while (iterator.hasNext()) {
              Map.Entry<String, CONTENT> entry = iterator.next();
              CONTENT content = entry.getValue();
              CmsResource contentFile = content.getFile();
              if (contentFile.getStructureId().equals(resource.getStructureId())
                  || contentFile.getResourceId().equals(resource.getResourceId())) {
                  iterator.remove();
              }
          }
  
      }
docs: Removes a cached XML content from the cache if it matches a given resource.<p>
  
  @param resource the resource for which the cached XML content should be removed
  @param cache the cache from which to remove the XML content