/tink_cache

Basic caching solutions

Primary LanguageHaxe

tink_cache

Build Status

Haxe caching based on tink_promise It wraps the original Promise with the same signature while it implements some caching logic inside itself.

Install

  • lix install gh:grosmar/tink_cache
  • add to your build.hxml: -lib tink_cache

Usage

Simple ttl caching:

// myPromiseFunc: your function that can provide any promise
// 5000: ttl
ttlCache(myPromiseFunc, 5000 );

You can compose freely any cache storege, see cache function

cache(new MyOwnStore(), myPromiseFunc);

... To be continued ...