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