MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / touch

Method touch

deps/GraphBLAS/CUDA/jitify.hpp:240–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238 return (bool)_objects.count(k);
239 }
240 inline void touch(const key_type& k) {
241 if (!this->contains(k)) {
242 throw std::runtime_error("Key not found in cache");
243 }
244 rank_iterator rank = std::find(_ranked_keys.begin(), _ranked_keys.end(), k);
245 if (rank != _ranked_keys.begin()) {
246 // Move key to front of ranks
247 _ranked_keys.erase(rank);
248 _ranked_keys.push_front(k);
249 }
250 }
251 inline value_type& get(const key_type& k) {
252 if (!this->contains(k)) {
253 throw std::runtime_error("Key not found in cache");

Callers 1

ObjectCacheClass · 0.95

Calls 3

containsMethod · 0.95
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected