// import localforage from "localforage";
export default async function setCache(key, value) {
  // try {
  //   await localforage?.setItem?.(key, value);
  // } catch (error) {
  //   console.log("Error setting data from cache with localforage", error);
  try {
    localStorage.setItem(key, JSON.stringify(value));
  }
  catch (err) {
    console.log("Error setting data from cache with localStorage", err);
  }
  // }
  return value;
}
//# sourceMappingURL=setCache.js.map