| @@ 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 | ||
| @@ 954-968 (lines=15) @@ | ||
| 951 | $db = self::getInstance(); |
|
| 952 | } |
|
| 953 | ||
| 954 | if ($useCache === true) { |
|
| 955 | $cache = new Cache(null, null, false, $useCache); |
|
| 956 | $cacheKey = 'sql-' . md5($query); |
|
| 957 | ||
| 958 | if ( |
|
| 959 | $cache->getCacheIsReady() === true |
|
| 960 | && |
|
| 961 | $cache->existsItem($cacheKey) |
|
| 962 | ) { |
|
| 963 | return $cache->getItem($cacheKey); |
|
| 964 | } |
|
| 965 | ||
| 966 | } else { |
|
| 967 | $cache = false; |
|
| 968 | } |
|
| 969 | ||
| 970 | $result = $db->query($query); |
|
| 971 | ||