Get Smarty

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:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

Grupos de Cache

Você pode fazer agrupamentos mais elaborados configurando grupos de cache_id. Isso é realizado pela separação de cada sub-grupo com uma barra vertical "|" no valor do cache_id. Você pode ter muitos sub-grupos com você desejar.

Example 14.9. Grupos de cache_id

require('Smarty.class.php');
$smarty = new Smarty;

$smarty->caching = true;

// clear all caches with "sports|basketball" as the first two cache_id groups
$smarty->clear_cache(null,"sports|basketball");

// clear all caches with "sports" as the first cache_id group. This would
// include "sports|basketball", or "sports|(anything)|(anything)|(anything)|..."
$smarty->clear_cache(null,"sports");

$smarty->display('index.tpl',"sports|basketball");

Notas Técnicas

O agrupamento de cache id NÃO use o path do template como alguma parte do cache_id. Por exemplo, se você tem display('themes/blue/index.tpl'), você não pode limpar o cache para tudo que estiver sob o diretório "themes/blue". Se você quiser fazer isso, você deve agrupá-los no cache_id, como display('themes/blue/index.tpl','themes|blue'); Então você pode limpar os caches para o tema azul com with clear_cache(null,'themes|blue');

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 17 plus 14? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk