StrategyKeyHelper#
-
class sigtech.framework.services.strategy_service.service.StrategyKeyHelper
Helper class to generate strategy key and to parse key string to its components
-
static generate_key(strategy_name: str = None, env: ConfiguredEnvironment = None, env_hash: str = None, object_version: Optional[str] = None, env_date_override: Optional[datetime] = None) str
Generate a cache key for a strategy name in an environment
- Parameters:
strategy_name – name of strategy
env – ConfigureEnvironment
env_hash – env config hash
object_version – str representing the object version
env_date_override – datetime to override env.asofdatetime
- Returns:
cache key by combining strategy name, env dates, and env hash
-
static parse_key(data) tuple
Factory method to create a
StrategyCacheKey
from a string representation.- Parameters:
data – Input string.