Class ExpressionSqlCache
Cache for compiled SQL templates.
Singleton per application with TTL and eviction.
Thread-safe.
public class ExpressionSqlCache
Inheritance
Properties
Methods
BuildCacheKey<TProps>(Expression<Func<TProps, bool>>, long)
Generates stable cache key from Expression (without constant values).
public string BuildCacheKey<TProps>(Expression<Func<TProps, bool>> predicate, long schemeId)
BuildCacheKey<TProps>(Expression<Func<TProps, bool>>?, IEnumerable<(string field, bool desc)>?, long)
Generates cache key for ordering + filter combination.
public string BuildCacheKey<TProps>(Expression<Func<TProps, bool>>? predicate, IEnumerable<(string field, bool desc)>? ordering, long schemeId)
TryGet(string, out CompiledQuery?)
Tries to get cached query.
public bool TryGet(string key, out CompiledQuery? query)