CacheKeys class
Namespace: Vitreous.Caching
Assembly: Vitreous.Caching.dll
Helpers for building cache keys consistently across all backends.
public static class CacheKeysInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”Combine(string?, string)
Section titled “ Combine(string?, string)”Joins prefix and key with exactly one
‘:’ separator. A prefix that already ends with ‘:’ is not doubled,
and an empty prefix returns key unchanged.
public static string Combine(string? prefix, string key)Parameters
Section titled “Parameters”prefix string?
key string
Returns
Section titled “Returns”Examples
Section titled “Examples”CacheKeys.Combine("vitreous:", "order:1") // "vitreous:order:1"
CacheKeys.Combine("vitreous", "order:1") // "vitreous:order:1"
CacheKeys.Combine("", "order:1") // "order:1"