Haxe caching based on tink_promise It wraps the original Promise with the same signature while it implements some caching logic inside itself.
lix install gh:grosmar/tink_cache
- add to your build.hxml:
-lib tink_cache
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 ...