interface Cache { deleteData( database: string, table: string, key: CacheKey, ): Promise<CacheDeleteResult>; deleteKeys( database: string, table: string, keys: readonly CacheKey[], ): Promise<CacheDeleteKeysResult>; getData<Value extends object>( database: string, table: string, keys: CacheKey | readonly CacheKey[], ): Promise<(
Value | null)
[]>; setData<Value extends object>( database: string, table: string, key: CacheKey, data: Value, ): Promise<CacheSetResult>;}
メソッド
deleteData
-
パラメータ
- database: string
- table: string
- key: CacheKey
deleteKeys
-
パラメータ
- database: string
- table: string
- keys: readonly CacheKey[]
getData
-
戻り値 Promise<(Value | null)[]>
Toshihiko の Cache バックエンドが実装する契約です。