nestegg

Very simple Kotlin caching library

License API 1+ Maven Central


Download

implementation("xyz.runnerbe:nestegg:${version}")

Usage

fun <T> T.egg(vararg key: String): T // caching data

fun <T> pick(vararg key: String): T? // get cached data or null if no cached

fun <T> pickOrElse(vararg key: String, or: () -> T): T // get cached data or execute `or` block

Example

Want example usage? Please see test code.

Caution

This library is designed for Runnerbe Android development.


Happy Coding 🙂

GitHub

View Github