lazy_cache 1.0.0 copy "lazy_cache: ^1.0.0" to clipboard
lazy_cache: ^1.0.0 copied to clipboard

outdated

Provides an indexed local storage on top of the shared_preferences package.

example/lazy_cache_example.dart

import 'package:lazy_cache/lazy_cache.dart' as lazy;

void main() async {
  var sampleCache = lazy.Cache(keyPrefix: 'sampleCache');

  for (int i = 0; i < 10; i++) {
    await sampleCache.set(i.toString(), 'Sample data: $i');
  }

  for (int i = 0; i < 10; i++) {
    print(await sampleCache.get(i.toString()));
  }

  print(sampleCache.index);

  sampleCache.clear();
}
1
likes
0
pub points
0%
popularity

Publisher

verified publisherjsiu.dev

Provides an indexed local storage on top of the shared_preferences package.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

json_preferences, lazy_log

More

Packages that depend on lazy_cache