aboutsummaryrefslogtreecommitdiff
path: root/src/cachehandler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cachehandler.hpp')
-rw-r--r--src/cachehandler.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cachehandler.hpp b/src/cachehandler.hpp
index 0d20962..e744f92 100644
--- a/src/cachehandler.hpp
+++ b/src/cachehandler.hpp
@@ -45,7 +45,9 @@ struct CachedPage
CachedPage(const QUrl &url, const QByteArray &body,
const MimeType &mime, const QDateTime &cached)
: url(url), body(body), mime(mime), scroll_pos(-1), time_cached(cached)
- {}
+ {
+ this->url.setFragment("");
+ }
};
// Maybe unordered_map isn't the best type for this?
@@ -67,12 +69,10 @@ public:
CacheMap const& getPages() const;
private:
- std::shared_ptr<CachedPage> find(QString const &url);
-
- bool contains(QString const & url);
-
void popOldest();
+ static QString cleanUrl(QUrl const & str);
+
private:
// In-memory cache storage.
CacheMap page_cache;