Skip to content

SnowCache Class ​

Definition ​

  • Namespace: JASE.ServiceNow
  • Assembly: JASE.ServiceNow.dll

Properties ​

NameDescription
AttemptsNumber of Attempts to read items from Cache
CapacityEvictionsNumber of times a Cache item was evicted due to capacity
CountReturns the number of items in the cache
DefaultTimeSpanReturns the default TimeSpan for time based expiration
EvictionsNumber of times a Cache item went stale and was evicted
HasSizeLimitReflects if the Memory Cache has a defined size limit
HitsNumber of times Cache reads successfully returned data
StatsGets a snapshot of current cache usage and eviction statistics

Methods ​

NameDescription
Task<T> GetOrInsertAsync(string key, Func<CancellationToken, Task<T>> factory, TimeSpan expiration, bool sliding = null, CancellationToken ct = null)
Task<T> GetOrInsertAsync(string key, string filename, Func<CancellationToken, Task<T>> factory, CancellationToken ct = null)