Table of Contents

Class DistributedCacheServiceKeys

Namespace
Excalibur.Dispatch.Caching
Assembly
Excalibur.Dispatch.Abstractions.dll

Service keys under which specially-scoped IDistributedCache registrations are published.

public static class DistributedCacheServiceKeys
Inheritance
DistributedCacheServiceKeys
Inherited Members

Remarks

These live in the abstractions package on purpose. A component that requires a scoped cache depends on the key, not on the caching implementation package, so requiring the guarantee costs no extra package dependency.

Fields

ApplicationScoped

The key for a distributed cache whose keyspace is partitioned per application.

public const string ApplicationScoped = "excalibur:application-scoped"

Field Value

string

Remarks

Depend on this key — rather than on the unkeyed IDistributedCache — when placing entries in a cache that two applications may share and whose contents must not be read across that boundary. Resolving it fails when no scoped cache has been registered, which is the point: an unscoped read is then not something a caller can express by accident.

The unkeyed IDistributedCache remains exactly what it was and is the right dependency for everything whose entries are harmless to share.