Share via


CacheItemKey Struct

Definition

A key to identify a cache entry.

public value class CacheItemKey : IEquatable<Microsoft::VisualStudio::RpcContracts::Caching::CacheItemKey>
[System.Runtime.Serialization.DataContract]
public readonly struct CacheItemKey : IEquatable<Microsoft.VisualStudio.RpcContracts.Caching.CacheItemKey>
[<System.Runtime.Serialization.DataContract>]
type CacheItemKey = struct
Public Structure CacheItemKey
Implements IEquatable(Of CacheItemKey)
Inheritance
CacheItemKey
Attributes
Implements

Constructors

Name Description
CacheItemKey(CacheContainerKey, String)

Initializes a new instance of the CacheItemKey struct.

CacheItemKey(CacheItemKey)

Initializes a new instance of the CacheItemKey struct.

CacheItemKey(ReadOnlyMemory<Byte>, Int64)

Initializes a new instance of the CacheItemKey struct.

Properties

Name Description
ContainerKey

Gets the key for the container to access.

ContentHash

Gets the cache key, in most cases this will be a hash value.

ContentSize

Gets the content size in the storage.

ItemName

Gets the name of the cache item.

Version

Gets an optional value for the cache item that labels the version of the cached value such that a stale or replaced value becomes inaccessible.

Methods

Name Description
Equals(CacheItemKey)

Indicates whether the current object is equal to another object of the same type.

Equals(Object)

Indicates whether this instance and a specified object are equal.

GetHashCode()

Returns the hash code for this instance.

WithVersion(ReadOnlyMemory<Byte>)

Initializes a new instance of the CacheItemKey struct with the specified value for Version.

Operators

Name Description
Equality(CacheItemKey, CacheItemKey)

Operator override for ==.

Inequality(CacheItemKey, CacheItemKey)

Operator override for !=.

Applies to