Skip to content

[FEATURE] 🔀 Expose the current distributed cache, if any #446

@jodydonetti

Description

@jodydonetti

Problem

Currently, given a FusionCache instance, it's only possible to know if there is a distributed cache level (L2) via the bool HasDistributedCache { get; } property, not which one it is.

Recently community user @angularsen asked to expose it in #443 .

Historically I've been hesitant to expose internals, but at this point I think I can let this one go.

Solution

Add a new IDistributedCache? DistributedCache { get; } property that expose the IDistributedCache instance being used, if any.

Alternatives

Some fragile reflection magic stuff, so, yeah.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions