Skip to content

Commit

Permalink
fix: better default retain times
Browse files Browse the repository at this point in the history
  • Loading branch information
schummar committed Feb 16, 2024
1 parent 7a2538e commit 76fb1f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,6 @@ export const createCache = /* @__PURE__ */ Object.assign(create, {
invalidateOnWindowFocus: true,
invalidateOnActivation: true,
clearUnusedAfter: { days: 1 },
retain: { seconds: 1 },
retain: { milliseconds: 1 },
} as CacheOptions<unknown>,
});
4 changes: 1 addition & 3 deletions src/core/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,5 @@ function create<T, Methods extends StoreMethods>(
}

export const createStore = /* @__PURE__ */ Object.assign(create, {
defaultOptions: {
retain: { seconds: 1 },
} as StoreOptions,
defaultOptions: {} as StoreOptions,
});

0 comments on commit 76fb1f4

Please sign in to comment.