smarty template engine
Tuesday, October 07, 2008  
download | documentation | faq | forum | mailing lists | changelog | contribs 


search for in the  


clear_cache()

clear_cache() -- Esto limpia el cache de un template especifico

Descripción

void clear_cache ( string template [, string cache_id [, string compile_id [, int expire_time]]])

Si usted tiene multiples caches en este archivo, usted puede limpiar un cache especifico proporcionando el cache_id como segundo parámetro Usted también puede pasar el $compile_id como un tercer parámetro. Usted puede "agrupar" templates conjuntamente de esta manera estos pueden ser removidos como un grupo. Vea el caching section para mayor información. Como un cuarto parámetro opcional, usted puede proporcionar un periodo minimo en segundos que el archivo de cache debe tener antes de ser anulado.

Ejemplo 13-1. clear_cache()

<?php
// 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');
?>

Ver también clear_all_cache() y caching.




 

credits 

Smarty Copyright © 2002-2008
New Digital Group, Inc.

All rights reserved.