| @@ 1100-1113 (lines=14) @@ | ||
| 1097 | $db = self::getInstance(); |
|
| 1098 | } |
|
| 1099 | ||
| 1100 | if ($useCache) { |
|
| 1101 | $cache = new Cache(null, null, false, $useCache); |
|
| 1102 | $cacheKey = 'sql-' . \md5($query); |
|
| 1103 | ||
| 1104 | if ( |
|
| 1105 | $cache->getCacheIsReady() |
|
| 1106 | && |
|
| 1107 | $cache->existsItem($cacheKey) |
|
| 1108 | ) { |
|
| 1109 | return $cache->getItem($cacheKey); |
|
| 1110 | } |
|
| 1111 | } else { |
|
| 1112 | $cache = false; |
|
| 1113 | } |
|
| 1114 | ||
| 1115 | $result = $db->query($query); |
|
| 1116 | ||
| @@ 216-229 (lines=14) @@ | ||
| 213 | ' . $whereSQL . ' |
|
| 214 | '; |
|
| 215 | ||
| 216 | if ($useCache) { |
|
| 217 | $cache = new Cache(null, null, false, $useCache); |
|
| 218 | $cacheKey = 'sql-phonetic-search-' . \md5($query); |
|
| 219 | ||
| 220 | if ( |
|
| 221 | $cache->getCacheIsReady() |
|
| 222 | && |
|
| 223 | $cache->existsItem($cacheKey) |
|
| 224 | ) { |
|
| 225 | return $cache->getItem($cacheKey); |
|
| 226 | } |
|
| 227 | } else { |
|
| 228 | $cache = false; |
|
| 229 | } |
|
| 230 | ||
| 231 | $result = $dbConnection->query($query); |
|
| 232 | ||