/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+recoil * @flow strict * @format */ 'use strict'; import type { CacheImplementation } from './Recoil_CacheImplementationType'; import type { CachePolicy, EqualityPolicy, EvictionPolicy } from './Recoil_CachePolicy'; const { LRUCache } = require('./Recoil_LRUCache'); const { MapCache } = require('./Recoil_MapCache'); const err = require('recoil-shared/util/Recoil_err'); const nullthrows = require('recoil-shared/util/Recoil_nullthrows'); const stableStringify = require('recoil-shared/util/Recoil_stableStringify'); const defaultPolicy = { equality: 'reference', eviction: 'none', maxSize: Infinity }; declare function cacheFromPolicy(arg0: CachePolicy): CacheImplementation; declare function getValueMapper(equality: EqualityPolicy): (mixed) => mixed; declare function getCache(eviction: EvictionPolicy, maxSize: ?number, mapKey: (mixed) => mixed): CacheImplementation; module.exports = cacheFromPolicy;