| @@ 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 | ||
| @@ 1109-1123 (lines=15) @@ | ||
| 1106 | $db = self::getInstance(); |
|
| 1107 | } |
|
| 1108 | ||
| 1109 | if ($useCache === true) { |
|
| 1110 | $cache = new Cache(null, null, false, $useCache); |
|
| 1111 | $cacheKey = 'sql-' . \md5($query); |
|
| 1112 | ||
| 1113 | if ( |
|
| 1114 | $cache->getCacheIsReady() === true |
|
| 1115 | && |
|
| 1116 | $cache->existsItem($cacheKey) |
|
| 1117 | ) { |
|
| 1118 | return $cache->getItem($cacheKey); |
|
| 1119 | } |
|
| 1120 | ||
| 1121 | } else { |
|
| 1122 | $cache = false; |
|
| 1123 | } |
|
| 1124 | ||
| 1125 | $result = $db->query($query); |
|
| 1126 | ||