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