Search packages, repositories and app categories

Package detailsv4.0.7

dio_cache_interceptor

Dio HTTP cache interceptor with multiple stores respecting HTTP directives (or not).

AndroidiOSWebmacOSWindowsLinux
30-day downloads
231K
Likes
443
Pub points
160

Install package

flutter pub add dio_cache_interceptor

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Dio Cache Interceptor is a Flutter/Dart package that adds HTTP caching capabilities to the Dio HTTP client. It supports multiple cache stores and respects standard HTTP caching directives such as Cache-Control and Expires, while also allowing customization to bypass these rules when needed. Ideal for improving app performance by reducing redundant network requests and minimizing data usage. The interceptor seamlessly integrates with existing Dio setups and works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Offline-first applications
  • Reducing API call frequency
  • Improving load times for repeated requests
  • Data-saving mobile apps
  • Caching static assets
  • Enhancing user experience during poor connectivity

Key features

  • Respects HTTP caching headers
  • Multiple cache store support
  • Configurable cache behavior
  • Seamless integration with Dio
  • Supports offline data retrieval
  • Customizable cache expiration

Suitable for

  • Apps requiring efficient network usage
  • Developers using Dio for HTTP requests
  • Projects needing offline functionality
  • Performance-critical applications
  • Teams managing API response caching

Considerations

  • Requires careful handling of cache invalidation
  • May increase memory usage with large caches
  • Needs proper configuration to avoid stale data
  • Not suitable for highly dynamic real-time data
  • Depends on Dio being used in the project

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

dio_cache_interceptor/README.md

Categories

Dependencies

Dependency list 2 items

  • dio^5.2.0+1
  • http_cache_core^1.1.4

Source repository

Projects using this package

Rankings