| @@ 230-243 (lines=14) @@ | ||
| 227 | ' . $whereSQL . ' |
|
| 228 | '; |
|
| 229 | ||
| 230 | if ($useCache) { |
|
| 231 | $cache = new Cache(null, null, false, $useCache); |
|
| 232 | $cacheKey = 'sql-phonetic-search-' . \md5($query); |
|
| 233 | ||
| 234 | if ( |
|
| 235 | $cache->getCacheIsReady() |
|
| 236 | && |
|
| 237 | $cache->existsItem($cacheKey) |
|
| 238 | ) { |
|
| 239 | return $cache->getItem($cacheKey); |
|
| 240 | } |
|
| 241 | } else { |
|
| 242 | $cache = false; |
|
| 243 | } |
|
| 244 | ||
| 245 | $result = $dbConnection->query($query); |
|
| 246 | ||
| @@ 1149-1162 (lines=14) @@ | ||
| 1146 | $db = self::getInstance(); |
|
| 1147 | } |
|
| 1148 | ||
| 1149 | if ($useCache) { |
|
| 1150 | $cache = new Cache(null, null, false, $useCache); |
|
| 1151 | $cacheKey = 'sql-' . \md5($query); |
|
| 1152 | ||
| 1153 | if ( |
|
| 1154 | $cache->getCacheIsReady() |
|
| 1155 | && |
|
| 1156 | $cache->existsItem($cacheKey) |
|
| 1157 | ) { |
|
| 1158 | return $cache->getItem($cacheKey); |
|
| 1159 | } |
|
| 1160 | } else { |
|
| 1161 | $cache = false; |
|
| 1162 | } |
|
| 1163 | ||
| 1164 | $result = $db->query($query); |
|
| 1165 | ||