CacheMemoryType
CacheMemoryType names the three internal cache stores DynamicWhere.ex maintains for reflection metadata. It's the handle you pass to CacheExpose.ClearCache(...) or CacheExpose.IsCacheFull(...) to operate on one store at a time. It lives in DynamicWhere.ex.Optimization.Cache.Config.
Values
| Value | Description |
|---|---|
TypeProperties | Cached property metadata per Type. |
PropertyPath | Cached validated & normalized property paths. |
CollectionElementType | Cached collection element-type lookups. |
The three cache stores
Each enum value maps one-to-one to an internal ConcurrentDictionary store managed by CacheDatabase. The CacheEvictionStrategy you configure applies to each store independently.
| Store | Key | Value | Purpose |
|---|---|---|---|
TypeProperties | Type | Dictionary<string, PropertyInfo> | All public instance properties per type. |
PropertyPath | (Type, string) | string | Validated & normalized property paths. |
CollectionElementType | Type | Type? | Element type for collection types. |
MaxCacheSize and EvictionStrategy from CacheOptions. To tune a store independently, you would need to manage it manually via CacheExpose — there is no per-store configuration.C# usage
Clear one store:
using DynamicWhere.ex.Optimization.Cache.Source;
using DynamicWhere.ex.Optimization.Cache.Config;
CacheExpose.ClearCache(CacheMemoryType.PropertyPath);Check whether a specific store is full:
bool full = CacheExpose.IsCacheFull(CacheMemoryType.TypeProperties);Clear all stores at once (does not require the enum):
CacheExpose.ClearAllCaches();Monitoring
Per-store statistics surface through the reporting APIs — every report enumerates all three values of this enum so you can see hit/miss rates, memory footprint, and eviction counts independently.
var stats = CacheExpose.GetCacheStatistics();
var memory = CacheExpose.GetMemoryUsage();
string report = CacheExpose.GeneratePerformanceReport();Related
- Cache architecture → overview of the six cache classes.
- Cache stores → detailed per-store reference.
- CacheEvictionStrategy → the algorithm applied to each store.
- Cache monitoring → reporting APIs and dashboards.