MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kakshya::RegionCacheManager Class Reference

Manages caching of region data for efficient access and eviction. More...

#include <RegionCacheManager.hpp>

+ Collaboration diagram for MayaFlux::Kakshya::RegionCacheManager:

Public Member Functions

 RegionCacheManager (size_t max_size)
 
 ~RegionCacheManager ()=default
 
 RegionCacheManager (const RegionCacheManager &)=delete
 
RegionCacheManageroperator= (const RegionCacheManager &)=delete
 
 RegionCacheManager (RegionCacheManager &&) noexcept=delete
 
RegionCacheManageroperator= (RegionCacheManager &&) noexcept=delete
 
void initialize ()
 Initialize the cache manager.
 
bool is_initialized () const
 Check if the cache manager is initialized.
 
void cache_region (const RegionCache &cache)
 
void cache_segment (const RegionSegment &segment)
 
std::optional< RegionCacheget_cached_region (const Region &region)
 
std::optional< RegionCacheget_cached_segment (const RegionSegment &segment)
 
std::optional< RegionSegmentget_segment_with_cache (const RegionSegment &segment)
 
void clear ()
 
size_t size () const
 
size_t max_size () const
 

Private Member Functions

void evict_lru_if_needed ()
 
std::optional< RegionCacheget_cached_region_internal (const Region &region)
 
void update_lru (const Region &region)
 

Private Attributes

std::unordered_map< Region, RegionCache, RegionHashm_cache
 
std::list< Regionm_lru_list
 
size_t m_max_cache_size
 
size_t m_current_size = 0
 
bool m_initialized = false
 
std::recursive_mutex m_mutex
 

Detailed Description

Manages caching of region data for efficient access and eviction.

Provides LRU-based caching for RegionCache and RegionSegment objects, supporting efficient repeated/random access to region data.

Definition at line 17 of file RegionCacheManager.hpp.


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