Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

clear_cache

void clear_cache(string template,
                 string cache id,
                 string compile id,
                 int expire time);

Isso limpa o cache de um template específico. Se você tem múltiplos caches para este arquivo, você limpa o cache específico fornecendo o cache id como o segundo parâmetro. Você pode também passar um compile id como um terceiro parâmetro. Você pode "agrupar" templates juntos e então eles podem ser removidos como um grupo. Veja o caching section para maiores informações. Como um quarto parâmetro opcional, você pode fornecer um ano mínimo em segundos que o arquivo de cache deve ter antes dele ser apagado.

Example 13.8. clear_cache

// clear the cache for a template
$smarty->clear_cache("index.tpl");

// clear the cache for a particular cache id in an multiple-cache template
$smarty->clear_cache("index.tpl","CACHEID");