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

outdated

Memory Cache is simple, fast and global in-memory cache.

example/memory_cache_example.dart

import 'package:memory_cache/memory_cache.dart';

void main() {
  MemoryCache.instance.create(
    'myKey',
    'myValue',
    expiry: const Duration(seconds: 5),
  );
  String? myValue = MemoryCache.instance.read<String>('myKey');
  print(myValue);
  MemoryCache.instance.update('myKey', 'myUpdatedValue');
  myValue = MemoryCache.instance.read<String>('myKey');
  print(myValue);
  MemoryCache.instance.delete('myKey');
  myValue = MemoryCache.instance.read<String>('myKey');
  print(myValue);
}
36
likes
0
pub points
88%
popularity

Publisher

verified publishergokberk.dev

Memory Cache is simple, fast and global in-memory cache.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on memory_cache