MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mrs::ItemEndpointResponseCache Class Reference

#include <response_cache.h>

Inheritance diagram for mrs::ItemEndpointResponseCache:
[legend]

Public Member Functions

 ItemEndpointResponseCache (ResponseCache *owner, uint64_t ttl_ms)
 
 ~ItemEndpointResponseCache () override
 
std::shared_ptr< CacheEntrycreate_table_entry (const Uri &uri, const std::string &user_id, const std::string &data, int64_t items)
 
std::shared_ptr< CacheEntrycreate_routine_entry (const Uri &uri, std::string_view req_body, const std::string &data, std::optional< helper::MediaType > media_type={})
 
std::shared_ptr< CacheEntrycreate_routine_entry (const Uri &uri, std::string_view req_body, const std::string &data, const std::string &media_type_str)
 
std::shared_ptr< CacheEntrylookup_table (const Uri &uri, const std::string &user_id)
 
std::shared_ptr< CacheEntrylookup_routine (const Uri &uri, std::string_view req_body)
 

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

◆ ItemEndpointResponseCache()

mrs::ItemEndpointResponseCache::ItemEndpointResponseCache ( ResponseCache owner,
uint64_t  ttl_ms 
)

◆ ~ItemEndpointResponseCache()

mrs::ItemEndpointResponseCache::~ItemEndpointResponseCache ( )
override

Member Function Documentation

◆ create_routine_entry() [1/2]

std::shared_ptr< CacheEntry > mrs::ItemEndpointResponseCache::create_routine_entry ( const Uri uri,
std::string_view  req_body,
const std::string &  data,
const std::string &  media_type_str 
)

◆ create_routine_entry() [2/2]

std::shared_ptr< CacheEntry > mrs::ItemEndpointResponseCache::create_routine_entry ( const Uri uri,
std::string_view  req_body,
const std::string &  data,
std::optional< helper::MediaType media_type = {} 
)

◆ create_table_entry()

std::shared_ptr< CacheEntry > mrs::ItemEndpointResponseCache::create_table_entry ( const Uri uri,
const std::string &  user_id,
const std::string &  data,
int64_t  items 
)

◆ lookup_routine()

std::shared_ptr< CacheEntry > mrs::ItemEndpointResponseCache::lookup_routine ( const Uri uri,
std::string_view  req_body 
)

◆ lookup_table()

std::shared_ptr< CacheEntry > mrs::ItemEndpointResponseCache::lookup_table ( const Uri uri,
const std::string &  user_id 
)

◆ remove_entry_nolock()

void mrs::ItemEndpointResponseCache::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: