Raxol. Performance. ETSCacheManager
(Raxol v2.8.0)
View Source
High-performance ETS cache manager for Raxol hot paths.
Provides dedicated caches for performance-critical operations:
- ANSI parser cache
- Cell creation cache
- Theme/style resolution cache
- Buffer operations cache
- Layout calculation cache
Uses ETS tables with optimized access patterns and LRU eviction.
Summary
Functions
Cache a buffer region.
Cache a cell creation.
Cache a parsed CSI sequence.
Cache font metrics calculation.
Cache a layout calculation. Supports both full tree layouts and partial node layouts.
Batch cache multiple layouts. Useful for pre-computing common viewport sizes.
Cache a style resolution.
Returns a specification to start this module under a supervisor.
Clear all caches.
Clear a specific cache: :csi_parser, :cell, :style, :buffer,
:layout or :font_metrics. Any other name returns
{:error, :unknown_cache}.
Get a cached buffer region.
Get a cached cell.
Get a cached CSI parse result.
Get cached font metrics.
Get a cached layout. Supports constraint matching for responsive layouts.
Get a cached style resolution.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Starts the server, registered under its module name unless :name is
given: clear_all/0, clear_cache/1, stats/0 and the opt-in caching in
Raxol.UI.ThemeResolver and Raxol.UI.StyleProcessor reach it by that name.
Get cache statistics.
Functions
Cache a buffer region.
Cache a cell creation.
Cache a parsed CSI sequence.
Cache font metrics calculation.
Cache a layout calculation. Supports both full tree layouts and partial node layouts.
Batch cache multiple layouts. Useful for pre-computing common viewport sizes.
Cache a style resolution.
Returns a specification to start this module under a supervisor.
See Supervisor.
Clear all caches.
@spec clear_cache(atom()) :: :ok | {:error, :unknown_cache}
Clear a specific cache: :csi_parser, :cell, :style, :buffer,
:layout or :font_metrics. Any other name returns
{:error, :unknown_cache}.
Get a cached buffer region.
Get a cached cell.
Get a cached CSI parse result.
Get cached font metrics.
Get a cached layout. Supports constraint matching for responsive layouts.
Get a cached style resolution.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Starts the server, registered under its module name unless :name is
given: clear_all/0, clear_cache/1, stats/0 and the opt-in caching in
Raxol.UI.ThemeResolver and Raxol.UI.StyleProcessor reach it by that name.
Get cache statistics.