import flatCache from 'flat-cache'; import { cachedir } from './util'; const cliCache = flatCache.load('local', cachedir()); function getItem(key: string): any { return cliCache.getKey(key); } function setItem(key: string, value: any): void { cliCache.setKey(key, value); cliCache.save(true); } function removeItem(key: string): void { cliCache.removeKey(key); cliCache.save(true); } export default { getItem, setItem, removeItem, };