MCPcopy Create free account
hub / github.com/activejs/activejs / updateValueAndCache

Function updateValueAndCache

packages/core/src/lib/abstract-unit-base.ts:757–778  ·  view source on GitHub ↗

* @internal please do not use.

(value: T, options?: DispatchOptions, skipCache = false)

Source from the content-addressed store, hash-verified

755 * @internal please do not use.
756 */
757 protected updateValueAndCache(value: T, options?: DispatchOptions, skipCache = false): void {
758 const {cacheReplace}: DispatchOptions = options || {};
759
760 if (Configuration.ENVIRONMENT.checkImmutability === true) {
761 deepFreeze(value);
762 }
763
764 if (!skipCache) {
765 this.updateCache(value, cacheReplace);
766 }
767
768 this._value = value;
769
770 if (this.isMuted) {
771 this.emitOnUnmute = true;
772 } else {
773 this.emitOnUnmute = null;
774 this.emit();
775 }
776
777 this.updateValueInPersistentStorage();
778 }
779
780 /**
781 * @internal please do not use.

Callers

nothing calls this directly

Calls 2

deepFreezeFunction · 0.90
emitMethod · 0.45

Tested by

no test coverage detected