inital
This commit is contained in:
7
node_modules/liquidjs/dist/cache/cache.d.ts
generated
vendored
Normal file
7
node_modules/liquidjs/dist/cache/cache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { Template } from '../template/template';
|
||||
export interface Cache<T> {
|
||||
write(key: string, value: T): void | Promise<void>;
|
||||
read(key: string): T | undefined | Promise<T | undefined>;
|
||||
remove(key: string): void | Promise<void>;
|
||||
}
|
||||
export type LiquidCache = Cache<Template[] | Promise<Template[]>>;
|
2
node_modules/liquidjs/dist/cache/index.d.ts
generated
vendored
Normal file
2
node_modules/liquidjs/dist/cache/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './cache';
|
||||
export * from './lru';
|
14
node_modules/liquidjs/dist/cache/lru.d.ts
generated
vendored
Normal file
14
node_modules/liquidjs/dist/cache/lru.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Cache } from './cache';
|
||||
export declare class LRU<T> implements Cache<T> {
|
||||
limit: number;
|
||||
size: number;
|
||||
private cache;
|
||||
private head;
|
||||
private tail;
|
||||
constructor(limit: number, size?: number);
|
||||
write(key: string, value: T): void;
|
||||
read(key: string): T | undefined;
|
||||
remove(key: string): void;
|
||||
clear(): void;
|
||||
private ensureLimit;
|
||||
}
|
1
node_modules/liquidjs/dist/cache/lru.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/cache/lru.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
Reference in New Issue
Block a user