Class Cache
Simple cache. The cache is essential to TuringTrader's automagic indicators and used for the object cache.
Implements
Inherited Members
Namespace: TuringTrader.SimulatorV2
Assembly: TuringTrader.Simulator.dll
Syntax
public class Cache : ICache
Methods
| Edit this page View SourceClear()
Clear cache contents.
Declaration
public void Clear()
Fetch<T>(string, Func<T>)
Retrieve object from cache, or calculate result.
Declaration
public T Fetch<T>(string cacheId, Func<T> missFun)
Parameters
Type | Name | Description |
---|---|---|
string | cacheId | cache id |
Func<T> | missFun | retrieval function for cache miss |
Returns
Type | Description |
---|---|
T | cached object |
Type Parameters
Name | Description |
---|---|
T |