| @@ 1143-1153 (lines=11) @@ | ||
| 1140 | $return = $result->fetchAllArray(); |
|
| 1141 | ||
| 1142 | // save into the cache |
|
| 1143 | if ( |
|
| 1144 | $cacheKey !== null |
|
| 1145 | && |
|
| 1146 | $useCache |
|
| 1147 | && |
|
| 1148 | $cache instanceof Cache |
|
| 1149 | && |
|
| 1150 | $cache->getCacheIsReady() |
|
| 1151 | ) { |
|
| 1152 | $cache->setItem($cacheKey, $return, $cacheTTL); |
|
| 1153 | } |
|
| 1154 | } else { |
|
| 1155 | $return = $result; |
|
| 1156 | } |
|
| @@ 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 | } |
|