Skip to main content

create_local_entropy_cache

Function create_local_entropy_cache 

Source
pub fn create_local_entropy_cache() -> Arc<RwLock<RawRwLock, EntropyCache>>
Expand description

Create a local entropy cache (backward compatibility)

Use this to opt-out of global caching for a specific processor. Default for TradeHistory when global cache is not explicitly provided.

§When to Use Local Cache

  • Single-symbol processor (no benefit from sharing)
  • Testing/isolation (prevent cache pollution from other processors)
  • Feature flag disabled (if global-entropy-cache feature is off)

§Performance

Local cache has same performance as before refactoring (128 entries, LRU eviction).