Table of Contents

Class NullConfigurationManagerCache

Namespace
Auth0.AspNetCore.Authentication.Api.CustomDomains
Assembly
Auth0.AspNetCore.Authentication.Api.dll

A pass-through cache implementation that does not cache configuration managers.
Use this to disable caching behavior.

public sealed class NullConfigurationManagerCache : IConfigurationManagerCache, IDisposable
Inheritance
NullConfigurationManagerCache
Implements
Inherited Members

Methods

Clear()

Clears all cached entries.

public void Clear()

Remarks

This is a no-op since nothing is cached.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Remarks

This is a no-op since there are no resources to dispose.

GetOrCreate(string, Func<string, IConfigurationManager<OpenIdConnectConfiguration>>)

Gets an existing configuration manager from the cache or creates a new one using the factory.

public IConfigurationManager<OpenIdConnectConfiguration> GetOrCreate(string metadataAddress, Func<string, IConfigurationManager<OpenIdConnectConfiguration>> factory)

Parameters

metadataAddress string

The OIDC metadata endpoint URL, used as the cache key.

factory Func<string, IConfigurationManager<OpenIdConnectConfiguration>>

Factory function to create a new configuration manager if not cached.

Returns

IConfigurationManager<OpenIdConnectConfiguration>

The cached or newly created configuration manager.

Remarks

This implementation always invokes the factory and never caches the result.