code: public void clearCachesFor(final String template) {
          Validate.notNull(template, "Cannot specify null template");
          if (this.templateCache != null) {
              final Set<TemplateCacheKey> keysToBeRemoved = new HashSet<TemplateCacheKey>(4);
              final Set<TemplateCacheKey> templateCacheKeys = this.templateCache.keySet();
              // We are iterating twice and creating a temporary set just in case the 'keySet' Set is still connected
              // to the original cache store and we provoke ConcurrentModificationExceptions when removing entries
              for (final TemplateCacheKey templateCacheKey : templateCacheKeys) {
                  final String ownerTemplate = templateCacheKey.getOwnerTemplate();
                  if (ownerTemplate != null) {
                      // It's not a standalone template, so we are interested on the owner template
                      if (ownerTemplate.equals(template)) {
                          keysToBeRemoved.add(templateCacheKey);
                      }
                  } else {
                      if (templateCacheKey.getTemplate().equals(template)) {
                          keysToBeRemoved.add(templateCacheKey);
                      }
                  }
              }
              for (final TemplateCacheKey keyToBeRemoved : keysToBeRemoved) {
                  this.templateCache.clearKey(keyToBeRemoved);
              }
          }
      }
docs: <p>
  Clears any existing entries for template of the specified
  name at the template cache.
  </p>
  
  @param template the name of the template whose entries have to be cleared.