@univerjs-pro/collaboration-client v0.5.0-beta.1Docs


Class: LocalCacheService

This service provide caching to the collaboration controller.

Extends

Constructors

new LocalCacheService()

new LocalCacheService(
   _configService, 
   _localStorageService, 
   _beforeCloseService, 
   _localeService, 
   _revisionService): LocalCacheService

Parameters

ParameterType
_configServiceIConfigService
_localStorageServiceILocalStorageService
_beforeCloseServiceIBeforeCloseService
_localeServiceLocaleService
_revisionServiceRevisionService

Returns

LocalCacheService

Overrides

Disposable.constructor

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:26

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93

Methods

disableLocalCache()

disableLocalCache(): void

Returns

void

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:39


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:47


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


enableLocalCache()

enableLocalCache(): void

Returns

void

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:43


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


exhaustSavingTask()

exhaustSavingTask(): Promise<void>

Returns

Promise<void>

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:111


loadOfflineData()

loadOfflineData(unitID): Promise<Nullable<IUnitCacheData>>

Parameters

ParameterType
unitIDstring

Returns

Promise<Nullable<IUnitCacheData>>

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:51


saveOfflineData()

saveOfflineData(unitID, data): Promise<boolean>

Parameters

ParameterType
unitIDstring
dataIUnitCacheData

Returns

Promise<boolean>

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:60


updateOfflineData()

updateOfflineData(
   unitID, 
   type, 
   awaitingChangeset, 
   pendingMutations): void

Parameters

ParameterType
unitIDstring
typeUniverType
awaitingChangesetNullable<IChangeset>
pendingMutationsIMutationInfo<object>[]

Returns

void

Defined in

packages/collaboration-client/src/services/local-cache/local-cache.service.ts:65