Skip to content

Commit

Permalink
Merge pull request #514 from devinit/hotfix/operation-data-caching
Browse files Browse the repository at this point in the history
Fix cached data ID for localForage
  • Loading branch information
edwinmp committed May 5, 2021
2 parents b1c961c + 3e26e01 commit 0cb3666
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/utils/cache/operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const getCachedOperationData = async ({
}: FetchOptions): Promise<[OperationData[], boolean]> => {
if (limit && typeof offset === 'number' && id) {
const cachedData = await localForage.getItem<string>(
`${localForageKeys.DATASET_DATA}-${limit}-${offset}-${id}`,
`${localForageKeys.DATASET_DATA}-${id}-${limit}-${offset}`,
);
const expiredCache: boolean = await isOperationDataCacheExpired({ limit, offset, id });

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "ddw-analyst-ui",
"version": "2.9.2",
"version": "2.9.3",
"description": "The new and improved DDW Analyst UI interface",
"main": "index.js",
"scripts": {
"start": "gulp",
"dev": "gulp",
"build": "gulp build",
"test": "jest --coverage && python3 manage.py test --settings=ddw_analyst_ui.test_settings",
"test:docker": "jest && docker-compose run web python3 manage.py test --settings=ddw_analyst_ui.docker_test_settings",
"test:docker": "jest --coverage && docker-compose run web python3 manage.py test --settings=ddw_analyst_ui.docker_test_settings",
"collectstatic": "python3 manage.py collectstatic --no-input",
"docker:build": "docker-compose up --build",
"docker:collectstatic": "docker-compose run web python3 manage.py collectstatic --no-input",
Expand All @@ -26,7 +26,7 @@
},
"husky": {
"hooks": {
"pre-push": "npm test",
"pre-push": "npm run test:docker",
"pre-commit": "lint-staged"
}
},
Expand Down

0 comments on commit 0cb3666

Please sign in to comment.