| @@ -11,11 +11,14 @@ | ||
| 11 | 11 | * Does not wrap {@see get_option()}. |
| 12 | 12 | */ |
| 13 | 13 | final class GeocodingRepository |
| 14 | 14 | { |
| 15 | - public function cacheKeySearch(string $query, int $limit): string | |
| 15 | + /** | |
| 16 | + * @param string $schema Bump when search API parameters change (busts stale cache). | |
| 17 | + */ | |
| 18 | + public function cacheKeySearch(string $query, int $limit, string $schema = 'v4'): string | |
| 16 | 19 | { |
| 17 | - return 'yatra_geo_search_' . md5($query . '|' . $limit); | |
| 20 | + return 'yatra_geo_search_' . md5($query . '|' . $limit . '|' . $schema); | |
| 18 | 21 | } |
| 19 | 22 | |
| 20 | 23 | public function cacheKeyReverse(float $lat, float $lng): string |
| 21 | 24 | { |