| @@ 267-277 (lines=11) @@ | ||
| 264 | $return = $phonetic->phonetic_matches($searchString, $dataToSearchIn); |
|
| 265 | ||
| 266 | // save into the cache |
|
| 267 | if ( |
|
| 268 | $cacheKey !== null |
|
| 269 | && |
|
| 270 | $useCache |
|
| 271 | && |
|
| 272 | $cache instanceof Cache |
|
| 273 | && |
|
| 274 | $cache->getCacheIsReady() |
|
| 275 | ) { |
|
| 276 | $cache->setItem($cacheKey, $return, $cacheTTL); |
|
| 277 | } |
|
| 278 | ||
| 279 | return $return; |
|
| 280 | } |
|
| @@ 1170-1180 (lines=11) @@ | ||
| 1167 | $return = $result->fetchAllArray(); |
|
| 1168 | ||
| 1169 | // save into the cache |
|
| 1170 | if ( |
|
| 1171 | $cacheKey !== null |
|
| 1172 | && |
|
| 1173 | $useCache |
|
| 1174 | && |
|
| 1175 | $cache instanceof Cache |
|
| 1176 | && |
|
| 1177 | $cache->getCacheIsReady() |
|
| 1178 | ) { |
|
| 1179 | $cache->setItem($cacheKey, $return, $cacheTTL); |
|
| 1180 | } |
|
| 1181 | } else { |
|
| 1182 | $return = $result; |
|
| 1183 | } |
|