ketting
Version:
Opinionated HATEOAS / Rest client.
36 lines (35 loc) • 946 B
TypeScript
import { StateCache } from './index.js';
import { State } from '../state/index.js';
/**
* 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 declare class NeverCache implements StateCache {
/**
* Store a State object.
*
* This function will clone the state object before storing
*/
store(state: State): void;
/**
* Retrieve a State object from the cache by its absolute uri
*/
get(uri: string): null;
/**
* Return true if a State object with the specified uri exists in the cache
*/
has(uri: string): boolean;
/**
* Delete a State object from the cache, by its uri
*/
delete(uri: string): void;
/**
* Purge the entire cache
*/
clear(): void;
}