smart_cache 0.2.0
smart_cache: ^0.2.0 copied to clipboard
A simple and efficient caching solution for Flutter applications using SQLite.
Changelog #
[0.2.0] - 2025-03-19 #
Added #
- Support for custom cache keys via the
cacheKey
property in request options - New
defaultCacheKeyBuilder
parameter toCacheInterceptor
constructor for custom key generation strategies - New
invalidateCacheForUrl()
method for backward compatibility with URL-based cache invalidation - Enhanced documentation with examples of custom key usage
_buildCacheKey()
helper method inCacheInterceptor
for consistent key generation
Changed #
- Modified
onRequest
andonResponse
methods to use custom cache keys when available - Updated the response's
extra
data to include the cache key used - Improved internal key handling to prioritize custom keys over URL-based keys
Improved #
- More flexible caching architecture allowing for versioned cache keys
- Better separation between URL and cache key concepts
- Enhanced organization capabilities through custom naming conventions
[0.1.0] - Initial Release #
- Basic caching functionality with SQLite backend
- Dio integration via
CacheInterceptor
- URL-based cache key system
- Configurable cache expiration times
- Automatic maintenance and cleanup of expired entries
- Pattern-based cache invalidation support