Skip to content

Instantly share code, notes, and snippets.

@studiocadogan
Created July 24, 2019 14:52
Show Gist options
  • Save studiocadogan/31e21b02e0defadbee7b230c9798fcfa to your computer and use it in GitHub Desktop.
Save studiocadogan/31e21b02e0defadbee7b230c9798fcfa to your computer and use it in GitHub Desktop.
class ApiCache {
constructor() {
this.cache = {};
}
setupCache(cache) {
this.cache = cache;
console.log(this.cache);
}
}
const cache = new ApiCache();
export const startCache = inst => cache.setupCache(inst);
import Cache from "../state/api/cache/redisCacheClient";
import { cacheInstance } from "../state/api/cache/redisCache";
const cache = new Cache(cacheInstance);
startCache(cache);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment