restio_cache 0.1.2+1 copy "restio_cache: ^0.1.2+1" to clipboard
restio_cache: ^0.1.2+1 copied to clipboard

discontinued

HTTP Cache (RFC 7234) support for Restio using LRU replacement strategy.

example/main.dart

import 'package:restio/restio.dart';
import 'package:restio_cache/restio_cache.dart';

void main() async {
  final store = await LruCacheStore.local('./cache');
  final cache = Cache(store: store);
  final client = Restio(cache: cache);

  final request = get('https://postman-echo.com/get');
  final call = client.newCall(request);
  final response = await call.execute();

  final data = await response.body.json();
  print(data);

  await response.close();

  await client.close();
}
1
likes
40
pub points
0%
popularity

Publisher

verified publishertiagohm.dev

HTTP Cache (RFC 7234) support for Restio using LRU replacement strategy.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

convert, crypto, file, meta, path, restio

More

Packages that depend on restio_cache