Skip to content

Documentation / @ember-data/store / types / CacheCapabilitiesManager

Type Alias: CacheCapabilitiesManager

ts
type CacheCapabilitiesManager = object;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:16

CacheCapabilitiesManager provides encapsulated API access to the minimal subset of the Store's functionality that Cache implementations should interact with. It is provided to the Store's createCache hook.

Cache implementations should not need more than this API provides.

This class cannot be directly instantiated.

Methods

disconnectRecord()

ts
disconnectRecord(identifier): void;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:68

Signal to the store that the specified record may be considered fully removed from the cache. Generally this means that not only does no data exist for the identified resource, no known relationships still point to it either.

Parameters

identifier

ResourceKey

Returns

void


getSchemaDefinitionService()

ts
getSchemaDefinitionService(): SchemaService;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:41

DEPRECATED - use the schema property

Provides access to the SchemaService instance for this Store instance.

The SchemaService can be used to query for information about the schema of a resource.

Returns

SchemaService

Deprecated

use CacheCapabilitiesManager.schema


hasRecord()

ts
hasRecord(identifier): boolean;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:75

Use this method to determine if the Store has an instantiated record associated with an identifier.

Parameters

identifier

ResourceKey

Returns

boolean


notifyChange()

Call Signature

ts
notifyChange(
   identifier, 
   namespace, 
   key): void;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:86

Notify subscribers of the NotificationManager that cache state has changed.

attributes and relationships do not require a key, but if one is specified it is assumed to be the name of the attribute or relationship that has been updated.

No other namespaces currently expect the key argument.

Parameters
identifier

ResourceKey

namespace

"added" | "removed"

key

null

Returns

void

Call Signature

ts
notifyChange(
   identifier, 
   namespace, 
   key): void;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:87

Parameters
identifier

RequestKey

namespace

"added" | "removed" | "updated"

key

null

Returns

void

Call Signature

ts
notifyChange(
   identifier, 
   namespace, 
   key): void;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:88

Parameters
identifier

ResourceKey

namespace

NotificationType

key

null | string

Returns

void

Call Signature

ts
notifyChange(
   identifier, 
   namespace, 
   key): void;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:89

Parameters
identifier

RequestKey | ResourceKey

namespace

NotificationType

key

null | string

Returns

void


setRecordId()

ts
setRecordId(identifier, id): void;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:59

Update the id for the record corresponding to the identifier This operation can only be done for records whose id is null.

Parameters

identifier

ResourceKey

id

string

Returns

void

Properties

cacheKeyManager

ts
cacheKeyManager: CacheKeyManager;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:26

Provides access to the CacheKeyManager instance for this Store instance.

The CacheKeyManager can be used to peek, generate or retrieve a stable unique identifier for any resource.


identifierCache

ts
identifierCache: CacheKeyManager;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:28

Deprecated

use CacheCapabilitiesManager.cacheKeyManager


schema

ts
schema: SchemaService;

Defined in: warp-drive-packages/core/declarations/store/-types/q/cache-capabilities-manager.d.ts:52

Provides access to the SchemaService instance for this Store instance.

The SchemaService can be used to query for information about the schema of a resource.

Released under the MIT License.