Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Commit

Permalink
disable api resources cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nailgun committed Aug 7, 2020
1 parent 21d9448 commit eb6410b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/modules/k8s/shared.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { call, put, take, takeEvery } from 'redux-saga/effects';
import store from 'store';
// import store from 'store';

import {
NotiErrorApi,
Expand Down Expand Up @@ -84,10 +84,12 @@ export async function apiFetch(url, options = {}, parser = 'json') {
}

export async function cacheGet(url) {
let result = store.get(url);
// cache is disabled because it is not important since new OpenAPI endpoint
// but it can break things with CRDs and external APIServices
let result = undefined; // store.get(url);
if (!result) {
result = await apiFetch(url);
store.set(url, result);
// store.set(url, result);
}
return Promise.resolve(result);
}
Expand Down

0 comments on commit eb6410b

Please sign in to comment.