smart_cache 0.2.0 copy "smart_cache: ^0.2.0" to clipboard
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 to CacheInterceptor 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 in CacheInterceptor for consistent key generation

Changed #

  • Modified onRequest and onResponse 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
1
likes
140
points
72
downloads

Publisher

verified publishermorpa.site

Weekly Downloads

A simple and efficient caching solution for Flutter applications using SQLite.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio, drift, flutter, path, path_provider, sqlite3_flutter_libs

More

Packages that depend on smart_cache