| @@ 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 | ||
| @@ 1003-1017 (lines=15) @@ | ||
| 1000 | $db = self::getInstance(); |
|
| 1001 | } |
|
| 1002 | ||
| 1003 | if ($useCache === true) { |
|
| 1004 | $cache = new Cache(null, null, false, $useCache); |
|
| 1005 | $cacheKey = 'sql-' . md5($query); |
|
| 1006 | ||
| 1007 | if ( |
|
| 1008 | $cache->getCacheIsReady() === true |
|
| 1009 | && |
|
| 1010 | $cache->existsItem($cacheKey) |
|
| 1011 | ) { |
|
| 1012 | return $cache->getItem($cacheKey); |
|
| 1013 | } |
|
| 1014 | ||
| 1015 | } else { |
|
| 1016 | $cache = false; |
|
| 1017 | } |
|
| 1018 | ||
| 1019 | $result = $db->query($query); |
|
| 1020 | ||