| 1 | <?php |
||
| 7 | class Predis extends AbstractCache |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \Predis\Client Predis Client |
||
| 11 | */ |
||
| 12 | protected $client; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string storage key |
||
| 16 | */ |
||
| 17 | protected $key; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int|null seconds until cache expiration |
||
| 21 | */ |
||
| 22 | protected $expire; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Constructor. |
||
| 26 | * |
||
| 27 | * @param \Predis\Client $client predis client |
||
| 28 | * @param string $key storage key |
||
| 29 | * @param int|null $expire seconds until cache expiration |
||
| 30 | */ |
||
| 31 | 12 | public function __construct(Client $client = null, $key = 'flysystem', $expire = null) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 6 | public function load() |
|
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | 6 | public function save() |
|
| 60 | |||
| 61 | /** |
||
| 62 | * Execute a Predis command. |
||
| 63 | * |
||
| 64 | * @param string $name |
||
| 65 | * @param array $arguments |
||
| 66 | * |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | 12 | protected function executeCommand($name, array $arguments) |
|
| 75 | } |
||
| 76 |