MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / setEntity

Method setEntity

client/js/src/cache/interface.ts:63–63  ·  view source on GitHub ↗

* Adds or updates entity in the local database. * * The `tags` is a list of strings that should be stored properly for fast * look-up. * * @example Usage by the SDK * ```ts * await cache.setEntity("node-abc42", "{ node abc42 serialised data }", ["parentUid:abc123",

(key: string, value: T, tags?: string[])

Source from the content-addressed store, hash-verified

61 * @throws Exception if `key` from `tags` is not one of the tag keys provided from `usedTagKeysBySDK` in constructor.
62 */
63 setEntity(key: string, value: T, tags?: string[]): Promise<void>;
64
65 /**
66 * Returns the data of the entity stored locally.

Callers 13

setNodeUidsMethod · 0.65
setNodeFunction · 0.65
setFolderChildrenLoadedFunction · 0.65
setNodeKeysMethod · 0.65
cache.test.tsFile · 0.65
setVolumeMethod · 0.65
setShareKeyMethod · 0.65
cache.test.tsFile · 0.65
setEntityMethod · 0.65

Implementers 4

NullCacheclient/js/src/cache/nullCache.ts
MemoryCacheclient/js/src/cache/memoryCache.ts
SQLiteCachecli/src/cache/sqliteCache.ts
DriveCryptoCacheAdaptercli/src/cache/driveCryptoCacheAdapter.

Calls

no outgoing calls

Tested by

no test coverage detected