UNPKG

ketting

Version:

Opiniated HATEAOS / Rest client.

48 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NeverCache = void 0; /** * The NeverCache caches absolutely nothing. * * This should usually only be used in testing scenarios or if you really * know what you're doing. * * Using it could cause excessive requests, and will cause embedded items * to be ignored. */ class NeverCache { /** * Store a State object. * * This function will clone the state object before storing */ store(state) { // Nothing to do } /** * Retrieve a State object from the cache by its absolute uri */ get(uri) { return null; } /** * Return true if a State object with the specified uri exists in the cache */ has(uri) { return false; } /** * Delete a State object from the cache, by its uri */ delete(uri) { // Nothing to do } /** * Purge the entire cache */ clear() { // Nothing to do } } exports.NeverCache = NeverCache; //# sourceMappingURL=never.js.map