geocode_cache 1.0.0
geocode_cache: ^1.0.0 copied to clipboard
A Flutter package for caching geocoding and place search results locally using Hive CE storage with Haversine distance matching. Minimizes API calls by serving nearby coordinates from cache.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-01-01 #
Added #
- Haversine-based proximity cache for reverse geocoding using Hive CE
- Place search caching via Nominatim with per-query cache keys
- Configurable cache radius, TTL, max size, and Hive box name
- Custom address formatter support
- FIFO eviction when cache reaches max size
- TTL-based stale entry eviction on startup
- Manual cache management:
clearCache(),clearGeocodeCache(),clearPlaceSearchCache(),evictEntriesOlderThan() copyWith()onGeocodeCacheOptionsfor easy option modificationisExpired()helper on cache model classes- Comprehensive API documentation
- Production-ready README with usage examples and architecture diagram
Changed #
getAddressFromCoordinates()now returnsString?instead of error strings- Geocoding errors are now rethrown instead of swallowed
- Place search cache box name is derived from the main box name
- Improved assertion messages with actionable guidance