aboutsummaryrefslogtreecommitdiff
path: root/src/cachehandler.hpp
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-01-08 20:46:56 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-01-08 11:12:14 +0100
commitb6bd6f442ac95376d78a14b3f503cb065781a5a5 (patch)
treeb33b7ff82c4079ceadca65fe6c2c5da0b0c62cb8 /src/cachehandler.hpp
parent35756f7a1b49f8d7aa603dd3bbe3c0a2c2d234a6 (diff)
downloadkristall-b6bd6f442ac95376d78a14b3f503cb065781a5a5.tar.gz
Functional cache limit, albeit a little inefficient
Diffstat (limited to 'src/cachehandler.hpp')
-rw-r--r--src/cachehandler.hpp4
1 files changed, 3 insertions, 1 deletions
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<QString, std::shared_ptr<CachedPage>> CacheMap;
class CacheHandler
@@ -71,6 +71,8 @@ private:
bool contains(QString const & url);
+ void popOldest();
+
private:
// In-memory cache storage.
CacheMap page_cache;