FLUTTER ECOSYSTEM

gokberkbar/memory_cache

मेमोरी कैश सरल, तेज़ और CRUD विशेषताओं के साथ वैश्विक मेमोरी कैश है।

memory_cache प्रोजेक्ट कवर
Stars
21
Forks
0
अंतिम पुश (UTC)
31 जन॰ 2023
प्रोजेक्ट स्थिति
सक्रिय
Gökberk Bardakçı GitHub avatar
GITHUB User

Gökberk Bardakçı ↗

An engineer who is in love with science and learning new things. A responsible person. Principle “if you are doing something do it right”.

Turkey
भाषाएँDart

तकनीकी विषय

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 3 आइटम
  • lintsडेवलपमेंट^2.0.0
  • testडेवलपमेंट^1.16.0
  • analyzerडेवलपमेंट^4.5.0

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

Memory Cache

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

Features

  • Create, read, update, delete and invalidate cache.
  • Expirable Cache
  • Creating local MemoryCache instance.

Getting started

Use this package as a Library

Depend On it

Run this command

with Dart:

$ dart pub add memory_cache

with Flutter:

$ flutter pub add memory_cache

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get or flutter pub get):

dependencies:
  memory_cache: ^1.2.0

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');
Local Instance

MemoryCache can be created locally and same features will be supported

final MemoryCache localCache = MemoryCache();