@@ 58-69 (lines=12) @@ | ||
55 | /** |
|
56 | * {@inheritdoc} |
|
57 | */ |
|
58 | final public function geocodeQuery(GeocodeQuery $query): Collection |
|
59 | { |
|
60 | $cacheKey = $this->getCacheKey($query); |
|
61 | if (null !== $result = $this->cache->get($cacheKey)) { |
|
62 | return $result; |
|
63 | } |
|
64 | ||
65 | $result = $this->realProvider->geocodeQuery($query); |
|
66 | $this->cache->set($cacheKey, $result, $this->lifetime); |
|
67 | ||
68 | return $result; |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * {@inheritdoc} |
|
@@ 74-85 (lines=12) @@ | ||
71 | /** |
|
72 | * {@inheritdoc} |
|
73 | */ |
|
74 | final public function reverseQuery(ReverseQuery $query): Collection |
|
75 | { |
|
76 | $cacheKey = $this->getCacheKey($query); |
|
77 | if (null !== $result = $this->cache->get($cacheKey)) { |
|
78 | return $result; |
|
79 | } |
|
80 | ||
81 | $result = $this->realProvider->reverseQuery($query); |
|
82 | $this->cache->set($cacheKey, $result, $this->lifetime); |
|
83 | ||
84 | return $result; |
|
85 | } |
|
86 | ||
87 | /** |
|
88 | * {@inheritdoc} |