![]() |
MySQL 9.3.0
Source Code Documentation
|
#include <response_cache.h>
Public Member Functions | |
FileEndpointResponseCache (ResponseCache *owner) | |
~FileEndpointResponseCache () override | |
std::shared_ptr< CacheEntry > | create_file_entry (const UniversalId &id, const std::string &data, helper::MediaType media_type) |
std::shared_ptr< CacheEntry > | lookup_file (const UniversalId &id) |
Private Member Functions | |
void | remove_entry_nolock (std::shared_ptr< CacheEntry > entry, bool ejected) override |
Additional Inherited Members | |
![]() | |
using | Uri = ::http::base::Uri |
using | UniversalId = ::mrs::database::entry::UniversalId |
![]() | |
EndpointResponseCache (ResponseCache *owner, uint64_t ttl_ms) | |
virtual | ~EndpointResponseCache ()=default |
std::shared_ptr< CacheEntry > | create_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< CacheEntry > | lookup (const std::string &key) |
![]() | |
ResponseCache * | owner_ |
std::chrono::milliseconds | ttl_ |
std::unordered_map< std::string, std::shared_ptr< CacheEntry > > | cache_ |
std::shared_mutex | cache_mutex_ |
|
explicit |
|
override |
std::shared_ptr< CacheEntry > mrs::FileEndpointResponseCache::create_file_entry | ( | const UniversalId & | id, |
const std::string & | data, | ||
helper::MediaType | media_type | ||
) |
std::shared_ptr< CacheEntry > mrs::FileEndpointResponseCache::lookup_file | ( | const UniversalId & | id | ) |
|
overrideprivatevirtual |
Reimplemented from mrs::EndpointResponseCache.