***********************************************************************
delTemplateEntry()
This removes the specified entry for the specified template from the disk.
***********************************************************************
346492
public int delTemplateEntry(String template,
                                Object entry) {
        int returnCode = NO_EXCEPTION;
        if (!this.disableTemplatesSupport) {
            if (delayOffload) {
                Result result = auxTemplateDependencyTable.removeEntry(template, entry);
                returnCode = result.returnCode;
                if (!result.bExist && returnCode != DISK_EXCEPTION) {
                    returnCode = delValueSetEntry(TEMPLATE_ID_DATA, template, entry);
                }
            } else {
                returnCode = delValueSetEntry(TEMPLATE_ID_DATA, template, entry);
            }
        }
        return returnCode;
    }
304879
function(options, cb) {

        function writeTemplate(callback) {
            options.soajs.log.debug('Writing template to temp folder ...');
            let templateFolderPath = path.join(__dirname, config.terraform.tempFolderPrefix);
            let templateFiles = [
                { name: config.terraform.templateDefaultName, content: options.params.template },
                { name: config.terraform.stateFileName, content: JSON.stringify(options.params.templateState, null, 2) },
            ];

            options.params.path = templateFolderPath;
            options.params.files = templateFiles;
            helper.writeToTempFolder(options, function(error, output) {
                if (error) return callback({error, code: 728});
                return callback(null, output);
            });
        }

        function excludeResources(result, callback) {
            if(!options.params.exclude || (Array.isArray(options.params.exclude) && options.params.exclude.length === 0)) {
                return callback(null, true);
            }

            options.soajs.log.debug('Excluding sensitive resources before destroying...');
            options.params.command = config.terraform.excludeResourceCommand;
            options.params.cwd = result.writeTemplate.tempFolderPath;
            options.params.exclude.forEach((oneExcludedResource) => options.params.command += `${oneExcludedResource} `);
            helper.runChildProcess(options, function(error, output) {
                if(error) options.soajs.log.debug(error);
                return callback(null, output);
            });
        }

        function destroyTemplate(result, callback) {
            options.soajs.log.debug('Destroying infra created using template ...');
            options.params.command = config.terraform.destroyCommand;
            options.params.cwd = result.writeTemplate.tempFolderPath;
            helper.runChildProcess(options, function(error, output) {
                if(error) return callback({ error, code: 729 });
                return callback(null, output);
            });
        }

        function cleanup(result, callback) {
            options.soajs.log.debug('Cleaing up temp folder ...');
            helper.cleanup({ tempFolderPath: result.writeTemplate.tempFolderPath }, function(error) {
                if(error) options.soajs.log.error('Cleanup failed after destroying terraform template!', error);
                return callback(null, true);
            });
        }

        async.auto({
            // create temp folder and write template and state file to it
            writeTemplate,
            // exclude resources that should'nt be destroyed
            excludeResources: ['writeTemplate', excludeResources],
            // terraform destroy
            destroyTemplate: ['writeTemplate', 'excludeResources', destroyTemplate],
            //delete temp folder
            cleanup: ['destroyTemplate', cleanup]
        }, function(error, result) {
            utils.checkError(error && error.error, error && error.code, cb, () => {
                let backupData = { render: options.params.template, templateOutput: result.destroyTemplate };
                helper.backup('destroy', options, backupData, function() {
                    return cb(null, {
                        destroyed: true,
                        output: result.destroyTemplate.output
                    });
                });
            });
        });
    }
564339
public void deleteTemplate(File templateFile) {
        ThymeLeafTemplateImplementation template = getTemplateByFile(templateFile);
        if (template != null) {
            deleteTemplate(template);
        }
    }
447097
public int writeTemplateEntry(String template,
                                  Object entry) {
        int rc = NO_EXCEPTION;
        if (!this.disableTemplatesSupport) {
            if (delayOffload) {
                ValueSet vs = auxTemplateDependencyTable.getEntries(template);
                if (vs == null) {
                    Result result = writeValueSetEntry(TEMPLATE_ID_DATA, template, entry, null, !ADD_IF_NEW);
                    rc = result.returnCode;
                    boolean bExist = result.bExist;
                    returnToResultPool(result);
                    if (rc != DISK_EXCEPTION && rc != DISK_SIZE_OVER_LIMIT_EXCEPTION && bExist == !EXIST) {
                        rc = auxTemplateDependencyTable.add(template, entry);
                    }
                } else {
                    rc = auxTemplateDependencyTable.add(template, vs, entry);
                }
            } else {
                Result result = writeValueSetEntry(TEMPLATE_ID_DATA, template, entry, null, ADD_IF_NEW);
                rc = result.returnCode;
                returnToResultPool(result);
            }
        }
        return rc;
    }
110543
function(){
    var i;
    var args = slice(arguments);
    var length = args.length;

    if (length > 0){
      for(i=0; i<length; i++){
        delete this.templateCaches[args[i]];
      }
    } else {
      this.templateCaches = {};
    }
  }
289397
private void removeEntry(EntryImpl<K, V> entry) {

    // Removes from bucket.
    EntryImpl<K, V> previous = entry._previous;
    EntryImpl<K, V> next = entry._next;
    if (previous != null) {
      previous._next = next;
      entry._previous = null;
    } else { // First in bucket.
      _entries[entry._index] = next;
    }
    if (next != null) {
      next._previous = previous;
      entry._next = null;
    } // Else do nothing, no last pointer.

    // Removes from collection.
    EntryImpl<K, V> before = entry._before;
    EntryImpl<K, V> after = entry._after;
    if (before != null) {
      before._after = after;
      entry._before = null;
    } else { // First in collection.
      _mapFirst = after;
    }
    if (after != null) {
      after._before = before;
    } else { // Last in collection.
      _mapLast = before;
    }

    // Clears value and key.
    entry._key = null;
    entry._value = null;

    // Recycles.
    entry._after = _poolFirst;
    _poolFirst = entry;

    // Updates size.
    _size--;
    sizeChanged();
  }
1221254
public void delCacheEntry(ValueSet removeList, int cause, int source, boolean fromDepIdTemplateInvalidation, boolean fireEvent) {
        htod.delCacheEntry(removeList, cause, source, fromDepIdTemplateInvalidation, fireEvent);
    }
1136472
@Override
	public void removeByC_C_T_ST(long classNameId, long classPK, int type,
		int status) {
		for (CPAttachmentFileEntry cpAttachmentFileEntry : findByC_C_T_ST(
				classNameId, classPK, type, status, QueryUtil.ALL_POS,
				QueryUtil.ALL_POS, null)) {
			remove(cpAttachmentFileEntry);
		}
	}
97550
public function deleteTemplateByCode($templatecode)
    {
        $template = $this->loadByTemplateByCode($templatecode);
        if ($template->getId()) {
            $template->delete();
        }
    }
1226660
function buildTemplate(){
    // build new declaration
    var declaration = getDeclFromSource(this.source, this.baseURI, false, {
      isolate: this.getIsolatePrefix()
    });

    // make functions and assign to template
    var destroyBuilder = this.destroyBuilder;
    var instances = {};
    var funcs = this.builder(declaration.tokens, instances);
    this.createInstance = funcs.createInstance;
    this.clearInstance = funcs.destroyInstance;
    this.destroyBuilder = funcs.destroy;

    store.add(this.templateId, this, instances);

    // for debug purposes only
    /** @cut */ this.instances_ = instances;
    /** @cut */ this.decl_ = declaration;


    // process dependencies
    var newDeps = declaration.deps;
    var oldDeps = this.deps_;
    this.deps_ = newDeps;

    // detach old deps
    if (oldDeps)
      for (var i = 0, dep; dep = oldDeps[i]; i++)
        dep.bindingBridge.detach(dep, templateSourceUpdate, this);

    // attach new deps
    if (newDeps)
      for (var i = 0, dep; dep = newDeps[i]; i++)
        dep.bindingBridge.attach(dep, templateSourceUpdate, this);


    // apply resources
    // start use new resource list and than stop use old resource list,
    // in this order FOUC is less possible
    var newResources = declaration.resources;
    var oldResources = this.resources;
    this.resources = newResources;

    if (newResources)
      for (var i = 0, item; item = newResources[i]; i++)
      {
        var resource = basis.resource(item.url).fetch();
        if (typeof resource.startUse == 'function')
          resource.startUse();
      }

    if (oldResources)
      for (var i = 0, item; item = oldResources[i]; i++)
      {
        var resource = basis.resource(item.url).fetch();
        if (typeof resource.stopUse == 'function')
          resource.stopUse();
      }


    // destroy old instances if any
    if (destroyBuilder)
      destroyBuilder(true);
  }
1229708
private void removeEntry(String key) {
        CacheHeader entry = mEntries.get(key);
        if (entry != null) {
            mTotalSize -= entry.size;
            mEntries.remove(key);
        }
    }
732702
public void installationTemplate_templateName_DELETE(String templateName) throws IOException {
		String qPath = "/me/installationTemplate/{templateName}";
		StringBuilder sb = path(qPath, templateName);
		exec(qPath, "DELETE", sb.toString(), null);
	}
362168
public void removeEntry(Data key, Object value, Index.OperationSource operationSource) {
        InternalIndex[] indexes = getIndexes();
        for (InternalIndex index : indexes) {
            index.removeEntry(key, value, operationSource);
        }
    }
1034556
public void onCacheHit(String template, int locality) {
        final String methodName = "onCacheHit()";

        CacheStatsModule csm = null;
        if ((csm = getCSM(template)) == null) {
            return;
        }
        if (tc.isDebugEnabled())
            Tr.debug(tc, methodName + " cacheName=" + _sCacheName + " template=" + template + " locality=" + locality + " enable=" + csm._enable
                    + " parentEnable=" + _enable + " " + this);

        switch (locality) {
        case REMOTE:
            if (csm._enable) {
                if (csm._remoteHitCount != null) {
                    csm._remoteHitCount.increment();
                }
                if (csm._inMemoryAndDiskCacheEntryCount != null) {
                    csm._inMemoryAndDiskCacheEntryCount.increment();
                }
                if (csm._remoteCreationCount != null) {
                    csm._remoteCreationCount.increment();
                }
            }
            break;
        case MEMORY:
            if (csm._enable && csm._hitsInMemoryCount != null)
                csm._hitsInMemoryCount.increment();
            break;
        case DISK:
            if (_csmDisk != null && _csmDisk._enable && _csmDisk._hitsOnDisk != null) {
                _csmDisk._hitsOnDisk.increment();
            }
            if (csm._enable && csm._hitsOnDiskCount != null)
                csm._hitsOnDiskCount.increment();
            break;
        default:
            if (tc.isDebugEnabled())
                Tr.debug(tc, methodName + " Error - Unrecognized locality " + locality + " cacheName=" + _sCacheName);
            break;
        }
        return;
    }
1197375
function (template) {
	if (template.attachments) {
		this.attachments = getCompiledArr( template.attachments );
	} else {
		this.attachments = [];
	}
	delete template.attachments;
	delete template.attachment;
	this.src = template;
	this.compiled = getCompiledObj( this.src );
}
777220
public void delCacheEntry(CacheEntry ce, int cause, int source, boolean fromDepIdTemplateInvalidation) {
        htod.delCacheEntry(ce, cause, source, fromDepIdTemplateInvalidation);
    }
224623
public void delTemplate(String template) {
        if (htod.delTemplate(template) == HTODDynacache.DISK_EXCEPTION) {
            stopOnError(this.htod.diskCacheException);
        }
    }