Class SimpleCache
Namespace: Belay.Core
Assembly: Belay.Core.dll
Simple, efficient caching implementation that replaces the complex caching infrastructure. Uses basic memoization suitable for MicroPython device operations.
public static class SimpleCache
Inheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Properties
Gets the current number of cached items.
Methods
Clears all cached values.
Checks if a key exists in the cache.
GetOrCreate<T>(string, Func<T>)
Gets a cached value or creates it using the factory function.
GetOrCreateAsync<T>(string, Func<Task<T>>, CancellationToken)
Gets a cached value or creates it asynchronously using the factory function. Thread-safe implementation prevents multiple concurrent factory executions.
Removes a specific cached value.