How to use the money-clip.getConfiguredCache function in money-clip

To help you get started, we’ve selected a few money-clip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github poketo / poketo-reader / src / store / cache.js View on Github external
// @flow

import { getConfiguredCache } from 'money-clip';

// NOTE: this cache version should be bumped any time the schema of the store
// changes shape, or the API responses change. It'll invalidate cached data and
// force a re-fetch.
const apiVersion = 'pqrtebuhhk';
const storeVersion = '1536114047316';
const version = `${apiVersion}-${storeVersion}`;
const maxAge = 432000000; // 5 days in milliseconds

const cache = getConfiguredCache({ version, maxAge });

export default cache;
github ipfs-shipyard / ipfs-webui / src / bundles / peer-locations.js View on Github external
constructor (opts) {
    this.geoipCache = getConfiguredCache({
      name: 'geoipCache',
      version: 1,
      maxAge: ms.weeks(1),
      ...opts.cache
    })

    this.failedAddrs = HLRU(500)

    this.queue = new PQueue({
      concurrency: opts.concurrency,
      autoStart: true
    })

    this.geoipLookupPromises = {}

    this.pass = 0

money-clip

For managing your client side cache. Tiny wrapper over IndexedDB supporting versioning and max age.

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Popular money-clip functions