| @@ 137-151 (lines=15) @@ | ||
| 134 | ' . $whereSQL . ' |
|
| 135 | '; |
|
| 136 | ||
| 137 | if ($useCache === true) { |
|
| 138 | $cache = new Cache(null, null, false, $useCache); |
|
| 139 | $cacheKey = 'sql-phonetic-search-' . md5($query); |
|
| 140 | ||
| 141 | if ( |
|
| 142 | $cache->getCacheIsReady() === true |
|
| 143 | && |
|
| 144 | $cache->existsItem($cacheKey) |
|
| 145 | ) { |
|
| 146 | return $cache->getItem($cacheKey); |
|
| 147 | } |
|
| 148 | ||
| 149 | } else { |
|
| 150 | $cache = false; |
|
| 151 | } |
|
| 152 | ||
| 153 | $result = $dbConnection->query($query); |
|
| 154 | ||
| @@ 989-1003 (lines=15) @@ | ||
| 986 | $db = self::getInstance(); |
|
| 987 | } |
|
| 988 | ||
| 989 | if ($useCache === true) { |
|
| 990 | $cache = new Cache(null, null, false, $useCache); |
|
| 991 | $cacheKey = 'sql-' . md5($query); |
|
| 992 | ||
| 993 | if ( |
|
| 994 | $cache->getCacheIsReady() === true |
|
| 995 | && |
|
| 996 | $cache->existsItem($cacheKey) |
|
| 997 | ) { |
|
| 998 | return $cache->getItem($cacheKey); |
|
| 999 | } |
|
| 1000 | ||
| 1001 | } else { |
|
| 1002 | $cache = false; |
|
| 1003 | } |
|
| 1004 | ||
| 1005 | $result = $db->query($query); |
|
| 1006 | ||