You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smarty_internal_method_clearallcache.php 996B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Smarty Method ClearAllCache
  4. *
  5. * Smarty::clearAllCache() method
  6. *
  7. * @package Smarty
  8. * @subpackage PluginsInternal
  9. * @author Uwe Tews
  10. */
  11. class Smarty_Internal_Method_ClearAllCache
  12. {
  13. /**
  14. * Valid for Smarty object
  15. *
  16. * @var int
  17. */
  18. public $objMap = 1;
  19. /**
  20. * Empty cache folder
  21. *
  22. * @api Smarty::clearAllCache()
  23. * @link http://www.smarty.net/docs/en/api.clear.all.cache.tpl
  24. *
  25. * @param \Smarty $smarty
  26. * @param integer $exp_time expiration time
  27. * @param string $type resource type
  28. *
  29. * @return int number of cache files deleted
  30. * @throws \SmartyException
  31. */
  32. public function clearAllCache(Smarty $smarty, $exp_time = null, $type = null)
  33. {
  34. $smarty->_clearTemplateCache();
  35. // load cache resource and call clearAll
  36. $_cache_resource = Smarty_CacheResource::load($smarty, $type);
  37. return $_cache_resource->clearAll($smarty, $exp_time);
  38. }
  39. }