26#ifndef MYSQL_HARNESS_UTILITY_CACHE_CACHE_H_
27#define MYSQL_HARNESS_UTILITY_CACHE_CACHE_H_
38template <
typename Key,
typename Value,
typename Algorithm>
43 template <
typename... Args>
83 *cached_value = std::forward<V>(
value);
87 Key *removed_key =
nullptr;
93 node.mapped() = std::forward<V>(
value);
106template <
typename Key,
typename Value, u
int32_t size>
112template <
typename Key,
typename Value>
Value * set_impl(const Key &key, V &&value)
Definition: cache.h:80
Cache(Args &&...args)
Definition: cache.h:44
Algorithm key_cache_
Definition: cache.h:102
Value * get_cached_value(const Key &key)
Definition: cache.h:55
Value * set(const Key &key, Value &&value)
Definition: cache.h:66
bool is_full() const
Definition: cache.h:76
Container container_
Definition: cache.h:103
Value * set(const Key &key, const Value &value)
Definition: cache.h:70
std::map< Key, Value > Container
Definition: cache.h:40
void remove(const Key &key)
Definition: cache.h:46
Container & get_container()
Definition: cache.h:74
std::string_view Key
The key type for the hash structure in HashJoinRowBuffer.
Definition: hash_join_buffer.h:108
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
size_t size(const char *const c)
Definition: base64.h:46
Algorithm
Definition: base64_encode.h:42
Define std::hash<Gtid>.
Definition: gtid.h:355
required string key
Definition: replication_asynchronous_connection_failover.proto:60