MCPcopy Create free account
hub / github.com/apache/trafficserver / get

Method get

plugins/slice/ObjectSizeCache.cc:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32std::optional<uint64_t>
33ObjectSizeCache::get(const std::string_view url)
34{
35 std::lock_guard lock{_mutex};
36 if (auto it = _index.find(url); it != _index.end()) {
37 // Cache hit
38 cache_size_type i = it->second;
39 _visits[i] = true;
40 assert(url == _urls[i]);
41 return _object_sizes[i];
42 } else {
43 // Cache miss
44 return std::nullopt;
45 }
46}
47
48void
49ObjectSizeCache::set(const std::string_view url, uint64_t object_size)

Callers 15

post_processFunction · 0.45
initializeMethod · 0.45
TSRemapNewInstanceFunction · 0.45
isKnownLargeObjMethod · 0.45
test_cache.ccFile · 0.45
writePostBodyFunction · 0.45
body_transformFunction · 0.45
XInjectResponseHeadersFunction · 0.45
RequestMethod · 0.45
dispatch.ccFile · 0.45
addBodyFunction · 0.45
dispatchFunction · 0.45

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected