1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00

LibWeb: Evict replaced Resource objects from cache

When a Resource is converted to an ImageResource, evict the original
resource from cache. The original resource's data has been moved, so on
a warm reload of a page, when that resource is loaded from cache, it
would not have any data to actually show.
This commit is contained in:
Timothy Flynn 2022-03-23 14:00:01 -04:00 committed by Andreas Kling
parent 004f69b535
commit 20eb441cba
3 changed files with 9 additions and 0 deletions

View file

@ -50,6 +50,7 @@ public:
void set_user_agent(const String& user_agent) { m_user_agent = user_agent; }
void clear_cache();
void evict_from_cache(LoadRequest const&);
private:
ResourceLoader(NonnullRefPtr<Protocol::RequestClient> protocol_client);