From b6bd6f442ac95376d78a14b3f503cb065781a5a5 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Fri, 8 Jan 2021 20:46:56 +1100 Subject: Functional cache limit, albeit a little inefficient --- src/cachehandler.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cachehandler.hpp') diff --git a/src/cachehandler.hpp b/src/cachehandler.hpp index a8bdb0f..0d20962 100644 --- a/src/cachehandler.hpp +++ b/src/cachehandler.hpp @@ -48,7 +48,7 @@ struct CachedPage {} }; -// TODO: move away from the 'unordered_map' type? +// Maybe unordered_map isn't the best type for this? typedef std::unordered_map> CacheMap; class CacheHandler @@ -71,6 +71,8 @@ private: bool contains(QString const & url); + void popOldest(); + private: // In-memory cache storage. CacheMap page_cache; -- cgit v1.2.3