| @@ 1011-1025 (lines=15) @@ | ||
| 1008 | $db = self::getInstance(); |
|
| 1009 | } |
|
| 1010 | ||
| 1011 | if ($useCache === true) { |
|
| 1012 | $cache = new Cache(null, null, false, $useCache); |
|
| 1013 | $cacheKey = 'sql-' . \md5($query); |
|
| 1014 | ||
| 1015 | if ( |
|
| 1016 | $cache->getCacheIsReady() === true |
|
| 1017 | && |
|
| 1018 | $cache->existsItem($cacheKey) |
|
| 1019 | ) { |
|
| 1020 | return $cache->getItem($cacheKey); |
|
| 1021 | } |
|
| 1022 | ||
| 1023 | } else { |
|
| 1024 | $cache = false; |
|
| 1025 | } |
|
| 1026 | ||
| 1027 | $result = $db->query($query); |
|
| 1028 | ||
| @@ 193-207 (lines=15) @@ | ||
| 190 | ' . $whereSQL . ' |
|
| 191 | '; |
|
| 192 | ||
| 193 | if ($useCache === true) { |
|
| 194 | $cache = new Cache(null, null, false, $useCache); |
|
| 195 | $cacheKey = 'sql-phonetic-search-' . \md5($query); |
|
| 196 | ||
| 197 | if ( |
|
| 198 | $cache->getCacheIsReady() === true |
|
| 199 | && |
|
| 200 | $cache->existsItem($cacheKey) |
|
| 201 | ) { |
|
| 202 | return $cache->getItem($cacheKey); |
|
| 203 | } |
|
| 204 | ||
| 205 | } else { |
|
| 206 | $cache = false; |
|
| 207 | } |
|
| 208 | ||
| 209 | $result = $dbConnection->query($query); |
|
| 210 | ||