Class CacheConfig
Cache Configuration Options
Inheritance
Inherited Members
Namespace: System.Linq.Dynamic.Core.Util.Cache
Assembly: System.Linq.Dynamic.Core.dll
Syntax
public class CacheConfig
Properties
| Improve this Doc View SourceCleanupFrequency
Sets the frequency for running the cleanup process in the Constant Expression cache. By default, cleanup occurs every 10 minutes.
Declaration
public TimeSpan CleanupFrequency { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
MinItemsTrigger
Configures the minimum number of items required in the constant expression cache before triggering cleanup. This prevents frequent cleanups, especially in caches with few items. A default value of null implies that cleanup is always allowed to run, helping in timely removal of unused cache items.
Declaration
public int? MinItemsTrigger { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
ReturnExpiredItems
Enables returning expired cache items in scenarios where cleanup, running on a separate thread, has not yet removed them. This allows for the retrieval of an expired object without needing to clear and recreate it if a request is made concurrently with cleanup. Particularly useful when cached items are deterministic, ensuring consistent results even from expired entries. Default true;
Declaration
public bool ReturnExpiredItems { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TimeToLive
Sets a Time-To-Live (TTL) for items in the constant expression cache to prevent uncontrolled growth. Items not accessed within this TTL will be expired, allowing garbage collection to reclaim the memory. Default is 10 minutes.
Declaration
public TimeSpan TimeToLive { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |