@@ 44-53 (lines=10) @@ | ||
41 | /** |
|
42 | * {@inheritdoc} |
|
43 | */ |
|
44 | public function get($key, $default = null) |
|
45 | { |
|
46 | try { |
|
47 | $item = $this->cache_item_pool->getItem($key); |
|
48 | } catch (CacheInvalidArgumentException $e) { |
|
49 | self::_rethrow($e); |
|
50 | } |
|
51 | ||
52 | return $item->isHit() ? $item->get() : $default; |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * {@inheritdoc} |
|
@@ 125-135 (lines=11) @@ | ||
122 | /** |
|
123 | * {@inheritdoc} |
|
124 | */ |
|
125 | public function set($key, $value, $ttl = null) |
|
126 | { |
|
127 | try { |
|
128 | $item = $this->cache_item_pool->getItem($key); |
|
129 | $this->setItemProperties($item, $value, $ttl); |
|
130 | } catch (CacheInvalidArgumentException $e) { |
|
131 | self::_rethrow($e); |
|
132 | } |
|
133 | ||
134 | return $this->cache_item_pool->save($item); |
|
135 | } |
|
136 | ||
137 | /** |
|
138 | * {@inheritdoc} |