Show / Hide Table of Contents

Class Cache<T>

Cache template class. The cache is at the core of TuringTrader's auto-magic indicator objects, as well as the the data sources. Cache objects are accessed via a cryptographic key, which is created by the CacheId class.

Inheritance
object
Cache<T>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TuringTrader.Simulator
Assembly: TuringTrader.Simulator.dll
Syntax
public static class Cache<T>
Type Parameters
Name Description
T

type of cache

Methods

| Improve this Doc View Source

GetData(CacheId, Func<T>, bool)

Retrieve data from cache.

Declaration
public static T GetData(CacheId id, Func<T> initialRetrieval, bool global = false)
Parameters
Type Name Description
CacheId id

unique ID of data

System.Func<TResult><T> initialRetrieval

lambda to retrieve data not found in cache

bool global

set to true, to cache globally across all threads

Returns
Type Description
T

cached data

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2011-2023, Bertram Enterprises LLC dba TuringTrader.com