easy_data_cache 1.0.1 copy "easy_data_cache: ^1.0.1" to clipboard
easy_data_cache: ^1.0.1 copied to clipboard

Key-value database with expiration time.

example/easy_data_cache_example.dart

import 'package:easy_data_cache/easy_data_cache.dart';

void main() async {
  await EasyDataCache.init();

  EasyDataCache.put('key', 'value', duration: Duration(seconds: 5));

  // EasyDataCache.put('key', 'value', expirationDate: DateTime(2025, 1, 1));

  print(EasyDataCache.get('key')); //value

  await Future.delayed(Duration(seconds: 5));

  print(EasyDataCache.get('key')); // null
}
2
likes
135
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

Key-value database with expiration time.

Repository (GitHub)
View/report issues

Topics

#database #cache

Documentation

API reference

License

MIT (license)

Dependencies

hive

More

Packages that depend on easy_data_cache