ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Container.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Cache\Container;
22
24
28interface Container
29{
34 public function lock(float $seconds): void;
35
39 public function isLocked(): bool;
40
44 public function has(string $key): bool;
45
49 public function get(string $key, Transformation $transformation): string|int|array|bool|null;
50
54 public function set(string $key, string|int|array|bool|null $value, ?int $ttl = null): void;
55
59 public function delete(string $key): void;
60
64 public function flush(): void;
65
69 public function getAdaptorName(): string;
70
74 public function getContainerName(): string;
75}
has(string $key)
Returns true if the container contains a value for the given key.
getAdaptorName()
Returns the name of the adaptop used (such as apc, memcache, phpstatic)
lock(float $seconds)
Locks the container for a given amount of seconds (max 300), in this time, get() will return null and...
flush()
Deletes all values in the container.
isLocked()
Returns true if the container is locked.
getContainerName()
Returns the name of the container.
A transformation is a function from one datatype to another.