-
Notifications
You must be signed in to change notification settings - Fork 86
/
settings.ts
26 lines (24 loc) · 957 Bytes
/
settings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
export const API_LIST_DEFAULT_PARAMS = {
limit: '21',
offset: '0',
};
export const EDX_CSRF_TOKEN_COOKIE_NAME = 'edx_csrf_token';
export const REACT_QUERY_SETTINGS = {
// Cache is garbage collected after this delay
cacheTime: 24 * 60 * 60 * 1000, // 24h in ms
// Data are considered as stale after this delay
staleTimes: {
default: 0, // Stale immediately
// session lifetime should be synchronized with the access token lifetime of your authentication
// service. For example if you are using djangorestframework-simplejwt default value
// is 5 minutes.
session: 5 * 60 * 1000, // 5 minutes in ms
sessionItems: 60 * 60 * 1000, // 1 hour, items related to the session should not be refreshed as the frequency than session information.
},
cacheStorage: {
// The key used to persist cache within cache storage
key: 'RICHIE_PERSISTED_QUERIES',
// Cache storage throttle time
throttleTime: 250,
},
};