Memory Cache
Memory Cache is simple, fast and global in-memory cache.
Features
- Create, read, update, delete and invalidate cache.
- Expirable Cache
Getting started
Use this package as a Library
Usage
Create New Value
MemoryCache.instance.create('myKey', 'myValue');
with Expiry:
MemoryCache.instance.create(
'myKey',
'myValue',
expiry: const Duration(seconds: 5),
);
Read Value
final myValue = MemoryCache.instance.read<String>('myKey');
Update Value
MemoryCache.instance.update('myKey', 'myUpdatedValue');
Delete Value
MemoryCache.instance.delete('myKey');