RequestServer: Pass the Request object to disk cache entry factories

This object will be needed in a future commit to store requests awaiting
other requests to finish. Doing this in a separate commit just to make
that commit less noisy.
This commit is contained in:
Timothy Flynn 2025-10-25 08:09:11 -04:00 committed by Andreas Kling
parent 5384f84550
commit 95d23d02f1
Notes: github-actions[bot] 2025-10-28 10:53:55 +00:00
4 changed files with 24 additions and 19 deletions

View file

@ -167,13 +167,13 @@ void Request::process()
void Request::handle_initial_state()
{
if (m_disk_cache.has_value()) {
m_cache_entry_reader = m_disk_cache->open_entry(m_url, m_method);
m_cache_entry_reader = m_disk_cache->open_entry(*this);
if (m_cache_entry_reader.has_value()) {
transition_to_state(State::ReadCache);
return;
}
m_cache_entry_writer = m_disk_cache->create_entry(m_url, m_method, m_request_start_time);
m_cache_entry_writer = m_disk_cache->create_entry(*this);
}
transition_to_state(State::DNSLookup);