diff --git a/lib/oleg.moon b/lib/oleg.moon index e9c0b1e..2f9415e 100644 --- a/lib/oleg.moon +++ b/lib/oleg.moon @@ -33,6 +33,7 @@ ret.delete = (tab, key) -> ret.set = (tab, key, value) -> request "POST", tab, key, value +--- cache gets a key from tab, optionally running the getter function if key is not in tab ret.cache = (tab, key, getter) -> data, err = ret.get tab, key