mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-04-19 15:38:34 +00:00
### Fixed
- Storage scanning no longer occurs when `Suspend file watching` is enabled (including boot-sequence). ### Improved - Saving notes and files now consumes less memory. - Chunk caching is now more efficient. - Both of them (may) are effective for #692, #680, and some more. ### Changed - `Incubate Chunks in Document` (also known as `Eden`) is now fully sunset. - The `Compute revisions for chunks` setting has also been removed. - As mentioned, `Memory cache size (by total characters)` has been removed. ### Refactored - A significant refactoring of the core codebase is underway (please refer the release-note).
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
import { deleteDB, type IDBPDatabase, openDB } from "idb";
|
||||
export interface KeyValueDatabase {
|
||||
get<T>(key: IDBValidKey): Promise<T>;
|
||||
set<T>(key: IDBValidKey, value: T): Promise<IDBValidKey>;
|
||||
del(key: IDBValidKey): Promise<void>;
|
||||
clear(): Promise<void>;
|
||||
keys(query?: IDBValidKey | IDBKeyRange, count?: number): Promise<IDBValidKey[]>;
|
||||
close(): void;
|
||||
destroy(): Promise<void>;
|
||||
}
|
||||
import type { KeyValueDatabase } from "../lib/src/interfaces/KeyValueDatabase.ts";
|
||||
const databaseCache: { [key: string]: IDBPDatabase<any> } = {};
|
||||
export const OpenKeyValueDatabase = async (dbKey: string): Promise<KeyValueDatabase> => {
|
||||
if (dbKey in databaseCache) {
|
||||
|
||||
Reference in New Issue
Block a user