Class DistributedArtifactCache
- Namespace
- ComponentSpace.Saml2.Cache
- Assembly
- ComponentSpace.Saml2.dll
The distributed artifact cache stores artifacts in a distributed cache.
The distributed artifact cache is suitable for applications deployed to a web farm.
public class DistributedArtifactCache : IArtifactCache
- Inheritance
-
DistributedArtifactCache
- Implements
- Inherited Members
Constructors
DistributedArtifactCache(IDistributedCache, ILoggerFactory)
Initializes a new instance of the DistributedArtifactCache class.
public DistributedArtifactCache(IDistributedCache distributedCache, ILoggerFactory loggerFactory)
Parameters
distributedCacheIDistributedCacheThe distributed cache used to store artifacts.
loggerFactoryILoggerFactoryThe logger factory.
Methods
AddAsync(string, string, DateTime)
Adds the artifact and associated state to the cache.
public Task AddAsync(string artifact, string artifactState, DateTime expirationDateTime)
Parameters
artifactstringThe artifact.
artifactStatestringThe artifact state.
expirationDateTimeDateTimeThe expiration time.
Returns
Exceptions
- SamlEnvironmentException
Thrown if the artifact cannot be added to the cache.
RemoveAsync(string)
Removes the artifact from the cache.
public Task<string> RemoveAsync(string artifact)
Parameters
artifactstringThe artifact.
Returns
Exceptions
- SamlEnvironmentException
Thrown if the artifact cannot be removed from the cache.