| Total Complexity | 5 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 92.86% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class MemcachedManager extends Manager |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var int $ttl time to live. |
||
| 12 | */ |
||
| 13 | private $ttl; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string $prefix key prefix. |
||
| 17 | */ |
||
| 18 | private $prefix; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \Memcached $conn |
||
| 22 | */ |
||
| 23 | private $conn; |
||
| 24 | |||
| 25 | 2 | public function __construct( |
|
| 26 | int $capacity, |
||
| 27 | float $rate, |
||
| 28 | LoggerInterface $logger, |
||
| 29 | \Memcached $conn, |
||
| 30 | int $ttl = 0, |
||
| 31 | string $prefix = '', |
||
| 32 | ?SerializerInterface $serializer = null |
||
| 33 | ) { |
||
| 34 | 2 | parent::__construct($capacity, $rate, $logger, $serializer); |
|
| 35 | 2 | $this->conn = $conn; |
|
| 36 | 2 | $this->ttl = $ttl; |
|
| 37 | 2 | $this->prefix = $prefix; |
|
| 38 | 2 | } |
|
| 39 | |||
| 40 | 1 | protected function load(string $name) |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | protected function save(string $name, $data) |
|
| 49 | } |
||
| 50 | 1 | } |
|
| 51 | |||
| 52 | 1 | protected function getKey(string $name): string |
|
| 57 |