Lean  $LEAN_TAG$
QuantConnect.Securities.SecurityCacheProvider Class Reference

A helper class that will provide SecurityCache instances More...

Public Member Functions

 SecurityCacheProvider (ISecurityProvider securityProvider)
 Creates a new instance More...
 
SecurityCache GetSecurityCache (Symbol symbol)
 Will return the SecurityCache instance to use for a give Symbol. If the provided Symbol is a custom type which has an underlying we will try to use the underlying SecurityCache type cache, if the underlying is not present we will keep track of the custom Symbol in case it is added later. More...
 

Detailed Description

A helper class that will provide SecurityCache instances

The value of this class and its logic is performance. This class allows for two different Security to share the same data type cache through different instances of SecurityCache. This is used to directly access custom data types through their underlying

Definition at line 34 of file SecurityCacheProvider.cs.

Constructor & Destructor Documentation

◆ SecurityCacheProvider()

QuantConnect.Securities.SecurityCacheProvider.SecurityCacheProvider ( ISecurityProvider  securityProvider)

Creates a new instance

Parameters
securityProviderThe security provider to use

Definition at line 43 of file SecurityCacheProvider.cs.

Member Function Documentation

◆ GetSecurityCache()

SecurityCache QuantConnect.Securities.SecurityCacheProvider.GetSecurityCache ( Symbol  symbol)

Will return the SecurityCache instance to use for a give Symbol. If the provided Symbol is a custom type which has an underlying we will try to use the underlying SecurityCache type cache, if the underlying is not present we will keep track of the custom Symbol in case it is added later.

Returns
The cache instance to use

Definition at line 56 of file SecurityCacheProvider.cs.

Here is the call graph for this function:

The documentation for this class was generated from the following file: