| @@ 302-309 (lines=8) @@ | ||
| 299 | { |
|
| 300 | $key = $this->normalizeCacheKey($key); |
|
| 301 | $cacheItemPool = $this->sdk->getCacheItemPool(); |
|
| 302 | if (isset($cacheItemPool)) { |
|
| 303 | $cacheKey = $this->sdk->getCachePrefix() . $key; |
|
| 304 | if ($cacheItemPool->hasItem($cacheKey)) { |
|
| 305 | $cacheItem = $cacheItemPool->getItem($cacheKey); |
|
| 306 | $cacheData = $cacheItem->get(); |
|
| 307 | return $cacheData; |
|
| 308 | } |
|
| 309 | } |
|
| 310 | ||
| 311 | return false; |
|
| 312 | } |
|
| @@ 324-332 (lines=9) @@ | ||
| 321 | { |
|
| 322 | $key = $this->normalizeCacheKey($key); |
|
| 323 | $cacheItemPool = $this->sdk->getCacheItemPool(); |
|
| 324 | if (isset($cacheItemPool)) { |
|
| 325 | $cacheKey = $this->sdk->getCachePrefix() . $key; |
|
| 326 | ||
| 327 | if (!$cacheItemPool->hasItem($cacheKey)) { |
|
| 328 | $cacheItem = $cacheItemPool->getItem($cacheKey); |
|
| 329 | $cacheItem->set($value); |
|
| 330 | $cacheItemPool->save($cacheItem); |
|
| 331 | } |
|
| 332 | } |
|
| 333 | } |
|
| 334 | ||
| 335 | /** |
|