UNPKG

iridium

Version:

A custom lightweight ORM for MongoDB designed for power-users

26 lines (25 loc) 715 B
import { CacheDirector } from "../CacheDirector"; /** * Caches documents using their _id field as the unique cache key. This * is useful if you primarily query your documents using their _id field, * however can be suboptimal (or even a complete waste) if you use different * types of queries. */ export declare class CacheOnID implements CacheDirector { valid(object: { _id: any; [prop: string]: any; }): boolean; buildKey(object: { _id: any; [prop: string]: any; }): any; validQuery(conditions: { _id?: any; [prop: string]: any; }): boolean; buildQueryKey(conditions: { _id: any; [prop: string]: any; }): any; }