Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
cache.php
1<?php
3
4use \Bitrix\Landing\Manager;
5
6class Cache
7{
11 const TAG_PREFIX = 'landing_page_';
12
17 public static function isCaching()
18 {
19 return defined('BX_COMP_MANAGED_CACHE') &&
20 BX_COMP_MANAGED_CACHE === true;
21 }
22
28 public static function register($id)
29 {
30 $id = intval($id);
31
32 if ($id > 0 && self::isCaching())
33 {
34 Manager::getCacheManager()->registerTag(
35 self::TAG_PREFIX . $id
36 );
37 }
38 }
39
45 public static function clear($id)
46 {
47 $id = intval($id);
48
49 if ($id > 0 && self::isCaching())
50 {
51 Manager::getCacheManager()->ClearByTag(
52 self::TAG_PREFIX . $id
53 );
54 }
55 }
56}
static getCacheManager()
Definition manager.php:89