Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=140844 Reviewed by Andreas Kling. Prevent the cache from growing without bounds. The simple scheme implemented here estimates the cache size from number of entries. When the estimated size exceeds the maximum size we randomly clear 1/4 of the entries. * NetworkProcess/cache/NetworkCacheStorage.h: * NetworkProcess/cache/NetworkCacheStorageCocoa.mm: (WebKit::NetworkCacheStorage::NetworkCacheStorage): (WebKit::NetworkCacheStorage::initialize): (WebKit::NetworkCacheStorage::removeEntry): (WebKit::NetworkCacheStorage::store): (WebKit::NetworkCacheStorage::setMaximumSize): (WebKit::NetworkCacheStorage::clear): (WebKit::NetworkCacheStorage::shrinkIfNeeded): (WebKit::NetworkCacheStorage::initializeKeyFilter): Deleted. Canonical link: https://commits.webkit.org/158835@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
3 changed files
with
89 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters