UNPKG

ketting

Version:

Opinionated HATEOAS / Rest client.

44 lines 954 B
/** * 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. */ export 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 } } //# sourceMappingURL=never.js.map