Table of Contents

Class TeamCacheWiring

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Whether the services a host registered are actually using the ITeamCache the container resolves — the one way the cache seam can be configured and silently not take effect.

public static class TeamCacheWiring
Inheritance
TeamCacheWiring
Inherited Members

Remarks

The hazard this exists to make loud. The bases accept ITeamCache as an optional constructor parameter, so a host service whose own constructor does not forward it compiles, starts, passes its tests, and quietly uses the process-local fallback instead. A host that registered Redis for a multi-instance deployment would believe it was in effect while a suspended member kept their team scopes on every instance that did not handle the write.

It inspects the outcome, not the constructor. Comparing the cache each live service holds against the registered one cannot produce a false positive, whereas reflecting over constructor parameters would misreport any host obtaining the cache some other way.

Methods

DescribeFailure(IReadOnlyList<string>)

The diagnostic shown when FindUnwired(ITeamCache, params object[]) reports something, naming the types and the fix.

public static string DescribeFailure(IReadOnlyList<string> unwired)

Parameters

unwired IReadOnlyList<string>

Returns

string

FindUnwired(ITeamCache, params object[])

The names of the supplied services that are not using registered. Empty when the wiring is correct, when no custom cache is registered, or when a service is not one of ours.

public static IReadOnlyList<string> FindUnwired(ITeamCache registered, params object[] services)

Parameters

registered ITeamCache

The ITeamCache the container resolves.

services object[]

The concrete team and user services the host registered.

Returns

IReadOnlyList<string>