summaryrefslogtreecommitdiff
path: root/src/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/history.c')
-rw-r--r--src/history.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/history.c b/src/history.c
index 59d515dc..6876d8e3 100644
--- a/src/history.c
+++ b/src/history.c
@@ -299,6 +299,18 @@ size_t cacheSize_History(const iHistory *d) {
299 return cached; 299 return cached;
300} 300}
301 301
302void clearCache_History(iHistory *d) {
303 lock_Mutex(d->mtx);
304 iForEach(Array, i, &d->recent) {
305 iRecentUrl *url = i.value;
306 if (url->cachedResponse) {
307 delete_GmResponse(url->cachedResponse);
308 url->cachedResponse = NULL;
309 }
310 }
311 unlock_Mutex(d->mtx);
312}
313
302size_t pruneLeastImportant_History(iHistory *d) { 314size_t pruneLeastImportant_History(iHistory *d) {
303 size_t delta = 0; 315 size_t delta = 0;
304 size_t chosen = iInvalidPos; 316 size_t chosen = iInvalidPos;