MySQL 9.3.0
Source Code Documentation
mrs::FileEndpointResponseCache Class Reference

#include <response_cache.h>

Inheritance diagram for mrs::FileEndpointResponseCache:
[legend]

Public Member Functions

 FileEndpointResponseCache (ResponseCache *owner)
 
 ~FileEndpointResponseCache () override
 
std::shared_ptr< CacheEntrycreate_file_entry (const UniversalId &id, const std::string &data, helper::MediaType media_type)
 
std::shared_ptr< CacheEntrylookup_file (const UniversalId &id)
 

Private Member Functions

void remove_entry_nolock (std::shared_ptr< CacheEntry > entry, bool ejected) override
 

Additional Inherited Members

- Public Types inherited from mrs::EndpointResponseCache
using Uri = ::http::base::Uri
 
using UniversalId = ::mrs::database::entry::UniversalId
 
- Protected Member Functions inherited from mrs::EndpointResponseCache
 EndpointResponseCache (ResponseCache *owner, uint64_t ttl_ms)
 
virtual ~EndpointResponseCache ()=default
 
std::shared_ptr< CacheEntrycreate_entry (const std::string &key, const std::string &data, int64_t items=0, std::optional< helper::MediaType > media_type={}, std::optional< std::string > media_type_str={})
 
void remove_entry (std::shared_ptr< CacheEntry > entry, bool ejected)
 
std::shared_ptr< CacheEntrylookup (const std::string &key)
 
- Protected Attributes inherited from mrs::EndpointResponseCache
ResponseCacheowner_
 
std::chrono::milliseconds ttl_
 
std::unordered_map< std::string, std::shared_ptr< CacheEntry > > cache_
 
std::shared_mutex cache_mutex_
 

Constructor & Destructor Documentation

◆ FileEndpointResponseCache()

mrs::FileEndpointResponseCache::FileEndpointResponseCache ( ResponseCache owner)
explicit

◆ ~FileEndpointResponseCache()

mrs::FileEndpointResponseCache::~FileEndpointResponseCache ( )
override

Member Function Documentation

◆ create_file_entry()

std::shared_ptr< CacheEntry > mrs::FileEndpointResponseCache::create_file_entry ( const UniversalId id,
const std::string &  data,
helper::MediaType  media_type 
)

◆ lookup_file()

std::shared_ptr< CacheEntry > mrs::FileEndpointResponseCache::lookup_file ( const UniversalId id)

◆ remove_entry_nolock()

void mrs::FileEndpointResponseCache::remove_entry_nolock ( std::shared_ptr< CacheEntry entry,
bool  ejected 
)
overrideprivatevirtual

Reimplemented from mrs::EndpointResponseCache.


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