Skip to content

Commit

Permalink
Revert "DBC22-2102: temporarily disable redux caching"
Browse files Browse the repository at this point in the history
This reverts commit 29d3f21.
  • Loading branch information
ray-oxd committed May 10, 2024
1 parent 29d3f21 commit 13081ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/expireReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const transformRehydrate = (outboundState, config) => {

// Check for the possible expiry if state has the persisted date
if (config.expireSeconds && outboundState.timeStamp) {
const startTime = (new Date(outboundState.timeStamp)).getTime();
const endTime = (new Date()).getTime();
const startTime = new Date(outboundState.timeStamp).getTime();
const endTime = new Date().getTime();

const duration = endTime - startTime;
const seconds = duration / 1000;
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const getConfig = (key, lifeInSeconds, initialState) => {

const store = configureStore({
reducer: {
feeds: persistReducer(getConfig('feeds'), feedsReducer),
cms: persistReducer(getConfig('cms'), cmsReducer),
feeds: persistReducer(getConfig('feeds', 60, feedsInitialState), feedsReducer),
cms: persistReducer(getConfig('cms', 60, cmsInitialState), cmsReducer),
routes: persistReducer(getConfig('routes'), routesReducer),
map: persistReducer(getConfig('map'), mapReducer),
},
Expand Down

0 comments on commit 13081ef

Please sign in to comment.