1 | <?php |
||
24 | class PredisCache extends BasePredisCache |
||
25 | { |
||
26 | /** @var MigrationVersionService */ |
||
27 | private $migrationVersionService; |
||
28 | |||
29 | /** @var int */ |
||
30 | private $defaultLifeTime; |
||
31 | |||
32 | /** @var string|null */ |
||
33 | private $lastMigrationVersion; |
||
34 | |||
35 | /** |
||
36 | * @param ClientInterface $client |
||
37 | * @param MigrationVersionService $migrationVersionService |
||
38 | * @param int $defaultLifeTime |
||
39 | */ |
||
40 | public function __construct(ClientInterface $client, MigrationVersionService $migrationVersionService, $defaultLifeTime = 0) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | protected function doFetch($id) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | protected function doFetchMultiple(array $keys): array |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | protected function doContains($id): bool |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | protected function doDelete($id): bool |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | protected function doDeleteMultiple(array $keys): bool |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | protected function doSave($id, $data, $lifetime = 0): bool |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | protected function doSaveMultiple(array $keysAndValues, $lifetime = 0): bool |
||
115 | |||
116 | /** |
||
117 | * @param string $key |
||
118 | * |
||
119 | * @return string |
||
120 | */ |
||
121 | private function getModifiedKeyWithMigrationPrefix(string $key): string |
||
129 | |||
130 | /** |
||
131 | * @param array $keys |
||
132 | * |
||
133 | * @return array |
||
134 | */ |
||
135 | private function getModifiedKeysWithMigrationPrefix(array $keys): array |
||
144 | |||
145 | /** |
||
146 | * @param array $keysAndValues |
||
147 | * |
||
148 | * @return array |
||
149 | */ |
||
150 | private function getModifiedKeysAndValuesWithMigrationPrefix(array $keysAndValues): array |
||
159 | } |
||
160 |