Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
21 | public function query(array $query=[], string $path=''): Result |
||
22 | { |
||
23 | ksort($query); |
||
24 | $key = $path . md5(serialize($query)); |
||
25 | |||
26 | $result = $this->cache->get($key); |
||
27 | if (!$result) { |
||
28 | $result = $this->service->query($query, $path); |
||
29 | $this->cache->set($key, $result); |
||
30 | } |
||
31 | |||
32 | return $result; |
||
33 | } |
||
34 | } |
||
35 |