@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
24 lines (23 loc) • 1.02 kB
TypeScript
/**
* @module Cache
*/
import { type ICacheAdapter } from "../../../../cache/contracts/_module-exports.js";
import type { TimeSpan } from "../../../../utilities/_module-exports.js";
/**
* This `NoOpCacheAdapter` will do nothing and is used for easily mocking {@link ICache | `ICache`} for testing.
*
*
* IMPORT_PATH: `"@daiso-tech/core/cache/adapters"`
* @group Adapters
*/
export declare class NoOpCacheAdapter<TType> implements ICacheAdapter<TType> {
get(_key: string): PromiseLike<TType | null>;
getAndRemove(_key: string): PromiseLike<TType | null>;
add(_key: string, _value: TType, _ttl: TimeSpan | null): PromiseLike<boolean>;
put(_key: string, _value: TType, _ttl: TimeSpan | null): PromiseLike<boolean>;
update(_key: string, _value: TType): PromiseLike<boolean>;
increment(_key: string, _value: number): PromiseLike<boolean>;
removeMany(_keys: string[]): PromiseLike<boolean>;
removeAll(): PromiseLike<void>;
removeByKeyPrefix(_prefix: string): PromiseLike<void>;
}