swr-utils.ts 292 B

12345678910111213
  1. import { isServer } from '@growi/core/dist/utils';
  2. export const swrGlobalConfiguration = Object.assign(
  3. {
  4. errorRetryCount: 1,
  5. },
  6. // set the request scoped cache provider in server
  7. isServer()
  8. ? {
  9. provider: (cache: any) => new Map<string, any>(cache),
  10. }
  11. : {},
  12. );