FilesystemAdapter
class FilesystemAdapter extends AbstractAdapter implements PruneableInterface
Свойства
| FilesystemTrait | |
| FilesystemCommonTrait | |
| AbstractTrait | |
| LoggerAwareTrait |
Методы
| hasItem($key) {@inheritdoc} | from AbstractTrait | |
| clear() {@inheritdoc} | from AbstractTrait | |
| deleteItem($key) {@inheritdoc} | from AbstractTrait | |
| deleteItems(array $keys) {@inheritdoc} | from AbstractTrait | |
| bool | enableVersioning(bool $enable = true) Включает/выключает верификацию элементов. | from AbstractTrait |
| reset() {@inheritdoc} | from AbstractTrait | |
| static | handleUnserializeCallback($class) | from AbstractTrait |
| static AdapterInterface | createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null) | from AbstractAdapter |
| static | createConnection($dsn, array $options = array()) | from AbstractAdapter |
| CacheItem | getItem($key) {@inheritdoc} | from AbstractAdapter |
| getItems(array $keys = array()) {@inheritdoc} | from AbstractAdapter | |
| save(CacheItemInterface $item) {@inheritdoc} | from AbstractAdapter | |
| saveDeferred(CacheItemInterface $item) {@inheritdoc} | from AbstractAdapter | |
| commit() {@inheritdoc} | from AbstractAdapter | |
| __destruct() | from FilesystemCommonTrait | |
| static | throwError($type, $message, $file, $line) | from FilesystemCommonTrait |
| bool | prune() | from FilesystemTrait |
| __construct(string $namespace = '', int $defaultLifetime, string $directory = null) |
Подробности
hasItem($key)
{@inheritdoc}
Параметры
| $key |
clear()
{@inheritdoc}
deleteItem($key)
{@inheritdoc}
Параметры
| $key |
deleteItems(array $keys)
{@inheritdoc}
Параметры
| array | $keys |
bool enableVersioning(bool $enable = true)
Включает/выключает верификацию элементов.
Когда верификация включена, очистка кэша атомарна и не требует перечисления существующих ключей для продолжения, но старые ключи могут потребовать сборки мусора, и потребуются дополнительные запросы к бэкенду.
Вызов этого метода также очищает кэшированную версию пространства имен и, таким образом, заставляет пересинхронизировать её.
Параметры
| bool | $enable |
Возвращаемое значение
| bool | предыдущее состояние верификации |
reset()
{@inheritdoc}
static handleUnserializeCallback($class)
Параметры
| $class |
static AdapterInterface createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null)
Параметры
| string | $namespace | |
| int | $defaultLifetime | |
| string | $version | |
| string | $directory | |
| LoggerInterface | $logger |
Возвращаемое значение
| AdapterInterface |
static createConnection($dsn, array $options = array())
Параметры
| $dsn | ||
| array | $options |
CacheItem getItem($key)
{@inheritdoc}
Параметры
| $key |
Возвращаемое значение
| CacheItem |
getItems(array $keys = array())
{@inheritdoc}
return \Traversable|CacheItem[]
Параметры
| array | $keys |
save(CacheItemInterface $item)
{@inheritdoc}
Параметры
| CacheItemInterface | $item |
saveDeferred(CacheItemInterface $item)
{@inheritdoc}
Параметры
| CacheItemInterface | $item |
commit()
{@inheritdoc}
__destruct()
static throwError($type, $message, $file, $line)
Параметры
| $type | ||
| $message | ||
| $file | ||
| $line |
bool prune()
Возвращаемое значение
| bool |
__construct(string $namespace = '', int $defaultLifetime, string $directory = null)
Параметры
| string | $namespace | |
| int | $defaultLifetime | |
| string | $directory |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Cache/Adapter/FilesystemAdapter.html