@@ -406,24 +406,21 @@ CacheProcessor::scan(Continuation *cont, std::string_view hostname, int KB_per_s
406406Action *
407407CacheProcessor::lookup (Continuation *cont, const HttpCacheKey *key, CacheFragType frag_type)
408408{
409- return lookup (cont, &key->hash , frag_type,
410- std::string_view{key->hostname , static_cast <std::string_view::size_type>(key->hostlen )});
409+ return lookup (cont, &key->hash , frag_type, key->hostname );
411410}
412411
413412Action *
414413CacheProcessor::open_read (Continuation *cont, const HttpCacheKey *key, CacheHTTPHdr *request, const HttpConfigAccessor *params,
415414 CacheFragType type)
416415{
417- return caches[type]->open_read (cont, &key->hash , request, params, type,
418- std::string_view{key->hostname , static_cast <std::string_view::size_type>(key->hostlen )});
416+ return caches[type]->open_read (cont, &key->hash , request, params, type, key->hostname );
419417}
420418
421419Action *
422420CacheProcessor::open_write (Continuation *cont, const HttpCacheKey *key, CacheHTTPInfo *old_info, time_t pin_in_cache,
423421 CacheFragType type)
424422{
425- return caches[type]->open_write (cont, &key->hash , old_info, pin_in_cache, type,
426- std::string_view{key->hostname , static_cast <std::string_view::size_type>(key->hostlen )});
423+ return caches[type]->open_write (cont, &key->hash , old_info, pin_in_cache, type, key->hostname );
427424}
428425
429426// ----------------------------------------------------------------------------
@@ -432,8 +429,7 @@ CacheProcessor::open_write(Continuation *cont, const HttpCacheKey *key, CacheHTT
432429Action *
433430CacheProcessor::remove (Continuation *cont, const HttpCacheKey *key, CacheFragType frag_type)
434431{
435- return caches[frag_type]->remove (cont, &key->hash , frag_type,
436- std::string_view{key->hostname , static_cast <std::string_view::size_type>(key->hostlen )});
432+ return caches[frag_type]->remove (cont, &key->hash , frag_type, key->hostname );
437433}
438434
439435/* * Set the state of a disk programmatically.
0 commit comments