1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
cache.php
См. документацию.
1<?php
2
9
11{
13 private $cache;
14
15 public function __construct()
16 {
17 $this->cache = \Bitrix\Main\Data\Cache::createInstance();
18 }
19
20 public function Clean($uniq_str, $initdir = false, $basedir = "cache")
21 {
22 return $this->cache->clean($uniq_str, $initdir, $basedir);
23 }
24
25 public function CleanDir($initdir = false, $basedir = "cache")
26 {
27 $this->cache->cleanDir($initdir, $basedir);
28 }
29
30 public function InitCache($TTL, $uniq_str, $initdir = false, $basedir = "cache")
31 {
32 return $this->cache->initCache($TTL, $uniq_str, $initdir, $basedir);
33 }
34
35 public function Output()
36 {
37 $this->cache->output();
38 }
39
40 public function GetVars()
41 {
42 return $this->cache->getVars();
43 }
44
45 public function StartDataCache($TTL = false, $uniq_str = false, $initdir = false, $vars = [], $basedir = "cache")
46 {
47 $narg = func_num_args();
48 if ($narg <= 0)
49 {
50 return $this->cache->startDataCache();
51 }
52 if ($narg <= 1)
53 {
54 return $this->cache->startDataCache($TTL);
55 }
56 if ($narg <= 2)
57 {
58 return $this->cache->startDataCache($TTL, $uniq_str);
59 }
60 if ($narg <= 3)
61 {
62 return $this->cache->startDataCache($TTL, $uniq_str, $initdir);
63 }
64
65 return $this->cache->startDataCache($TTL, $uniq_str, $initdir, $vars, $basedir);
66 }
67
68 function AbortDataCache()
69 {
70 $this->cache->abortDataCache();
71 }
72
79 function EndDataCache($vars = false)
80 {
81 $this->cache->endDataCache($vars);
82 }
83
85 {
86 return $this->cache->isCacheExpired($path);
87 }
88
89 public static function ClearCache($full = false, $initdir = '')
90 {
91 if ($initdir === "" && is_string($full))
92 {
93 $initdir = $full;
94 $full = true;
95 }
96
97 if ($full === true)
98 {
99 $obCache = new CPHPCache;
100 $obCache->CleanDir($initdir, "cache");
101 }
102 }
103}
$path
Определения access_edit.php:21
Определения cache.php:11
__construct()
Определения cache.php:15
Clean($uniq_str, $initdir=false, $basedir="cache")
Определения cache.php:20
InitCache($TTL, $uniq_str, $initdir=false, $basedir="cache")
Определения cache.php:30
IsCacheExpired($path)
Определения cache.php:84
Output()
Определения cache.php:35
EndDataCache($vars=false)
Определения cache.php:79
AbortDataCache()
Определения cache.php:68
StartDataCache($TTL=false, $uniq_str=false, $initdir=false, $vars=[], $basedir="cache")
Определения cache.php:45
GetVars()
Определения cache.php:40
CleanDir($initdir=false, $basedir="cache")
Определения cache.php:25
static ClearCache($full=false, $initdir='')
Определения cache.php:89