Skip to content

NavigationCache beta ​

Interface of @v12-engine/engine

ts
export interface NavigationCache

Where what was built is kept, by a hash of what it was built from: in memory when nothing else is said (memoryNavigationCache). A game keeps it elsewhere with one of its own (the browser's storage, a file)

Members ​

get ​

ts
get(key: string): Uint8Array | undefined | Promise<Uint8Array | undefined>;

Gives what was built under the key, or undefined when nothing was; may answer later

set ​

ts
set(key: string, data: Uint8Array): void | Promise<void>;

Keeps what was built under the key