File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/modules/main/lib/data/localstorage/storage/cachestorage.php
Back
<?php namespace Bitrix\Main\Data\LocalStorage\Storage; use Bitrix\Main\Application; use Bitrix\Main\Data\Cache; use Bitrix\Main\Data\ICacheEngine; class CacheStorage implements StorageInterface { private const CACHE_DIR = 'local-session'; /** @var string */ private $baseDir; /** @var CacheEngineInterface */ private $cacheEngine; public function __construct(CacheEngineInterface $cacheEngine) { $this->cacheEngine = $cacheEngine; $this->baseDir = Application::getPersonalRoot() . '/cache/'; } public function read(string $key, int $ttl) { $filename = '/' . Cache::getPath($key); if ($this->cacheEngine->read($value, $this->baseDir, self::CACHE_DIR, $filename, $ttl)) { return $value; } return null; } public function write(string $key, $value, int $ttl) { $filename = '/' . Cache::getPath($key); $this->cacheEngine->write($value, $this->baseDir, self::CACHE_DIR, $filename, $ttl); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings