redux-cached-api-middleware
Version:
API caching solution for redux apps
15 lines (11 loc) • 364 B
JavaScript
import { CACHE_TYPES } from '../constants';
export var type = CACHE_TYPES.SIMPLE;
export var buildStrategy = function buildStrategy() {
return { type: type };
};
export var shouldFetch = function shouldFetch(_ref) {
var state = _ref.state;
if (state && (state.fetching || state.fetched)) return false;
return true;
};
//# sourceMappingURL=simple.js.map