Show / Hide Table of Contents

Class DistributedArtifactCache

The distributed artifact cache stores artifacts in a distributed cache.

The distributed artifact cache is suitable for applications deployed to a web farm.

Inheritance
System.Object
DistributedArtifactCache
Implements
IArtifactCache
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ComponentSpace.Saml2.Cache
Assembly: ComponentSpace.Saml2.dll
Syntax
public class DistributedArtifactCache : IArtifactCache

Constructors

DistributedArtifactCache(IDistributedCache, ILoggerFactory)

Initializes a new instance of the DistributedArtifactCache class.

Declaration
public DistributedArtifactCache(IDistributedCache distributedCache, ILoggerFactory loggerFactory)
Parameters
Type Name Description
Microsoft.Extensions.Caching.Distributed.IDistributedCache distributedCache

The distributed cache used to store artifacts.

Microsoft.Extensions.Logging.ILoggerFactory loggerFactory

The logger factory.

Methods

AddAsync(String, String, DateTime)

Adds the artifact and associated state to the cache.

Declaration
public async Task AddAsync(string artifact, string artifactState, DateTime expirationDateTime)
Parameters
Type Name Description
System.String artifact

The artifact.

System.String artifactState

The artifact state.

System.DateTime expirationDateTime

The expiration time.

Returns
Type Description
System.Threading.Tasks.Task
Exceptions
Type Condition
SamlEnvironmentException

Thrown if the artifact cannot be added to the cache.

RemoveAsync(String)

Removes the artifact from the cache.

Declaration
public async Task<string> RemoveAsync(string artifact)
Parameters
Type Name Description
System.String artifact

The artifact.

Returns
Type Description
System.Threading.Tasks.Task<System.String>

A task that represents the remove operation and returns the associated artifact state.

Exceptions
Type Condition
SamlEnvironmentException

Thrown if the artifact cannot be removed from the cache.

Implements

IArtifactCache
In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2022. All rights reserved.