Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bang88/flutter_mmkv_cache

A cache for Flutter project implement it with mmkv framework. and support expires
https://github.com/bang88/flutter_mmkv_cache

Last synced: 8 days ago
JSON representation

A cache for Flutter project implement it with mmkv framework. and support expires

Awesome Lists containing this project

README

        

# flutter_mmkv_cache

[![pub package](https://img.shields.io/pub/v/flutter_mmkv_cache.svg)](https://pub.dartlang.org/packages/flutter_mmkv_cache)

> A cache for Flutter project implement it with mmkv framework. and support expires

## Getting Started

```yaml
dependencies:
flutter_mmkv_cache: ^0.0.2
```

### Usage

```dart
import 'package:flutter_mmkv_cache/flutter_mmkv_cache.dart';

/// https://github.com/OpenFlutter/mmkv_flutter

/// ExpiredCache

/// add value to cache will expired in 1 hour
final boolRes = await ExpiredCache.add('key', 'value', expired: 1 );

/// get value from cache
final value = await ExpiredCache.get('key');

```

### Licenses

Original License https://github.com/OpenFlutter/mmkv_flutter