clean_cache 1.1.0 copy "clean_cache: ^1.1.0" to clipboard
clean_cache: ^1.1.0 copied to clipboard

A cache abstraction designed for Clean Architecture.

Designed for use in projects that follow The Clean Architecture pattern, clean_cache is a simple cache abstraction allowing you to easily mock it for unit tests.

Features #

Several prebuilt cache are included:

  • Memory cache
  • Hive cache
  • Hybrid cache

If you need something specific, you just need to implement the LocalCache abstraction.

Getting started #

Just install the package to get started.

flutter pub add clean_cache

Usage #

import 'package:clean_cache/cache/memory_cache.dart';

// This stores an ExampleModel with a String key.
final cache = MemoryCache<String, ExampleModel>();
final model = ExampleModel();
await cache.write(model.id, model);
1
likes
130
pub points
37%
popularity

Publisher

verified publisherneutrinographics.com

A cache abstraction designed for Clean Architecture.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, hive

More

Packages that depend on clean_cache