Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F390727
smarty_method_clear_cache.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
993 B
Subscribers
None
smarty_method_clear_cache.php
View Options
<?php
/**
* Smarty method Clear_Cache
*
* Empties the cache for a specific template
*
* @package Smarty
* @subpackage SmartyMethod
* @author Uwe Tews
*/
/**
* Empty cache for a specific template
*
* @param object $smarty
* @param string $template_name template name
* @param string $cache_id cache id
* @param string $compile_id compile id
* @param integer $exp_time expiration time
* @param string $type resource type
* @return integer number of cache files deleted
*/
function
Smarty_Method_Clear_Cache
(
$smarty
,
$template_name
,
$cache_id
=
null
,
$compile_id
=
null
,
$exp_time
=
null
,
$type
=
'file'
)
{
// load cache resource
$_cache_resource_class
=
'Smarty_Internal_CacheResource_'
.
$type
;
if
(!
$smarty
->
loadPlugin
(
$_cache_resource_class
))
{
throw
new
Exception
(
"Undefined cache resource type {$type}"
);
}
$cache_object
=
new
$_cache_resource_class
(
$smarty
);
return
$cache_object
->
clear
(
$template_name
,
$cache_id
,
$compile_id
,
$exp_time
);
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 22, 15:27 (7 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
21993
Default Alt Text
smarty_method_clear_cache.php (993 B)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment