diff options
Diffstat (limited to 'src/history.c')
-rw-r--r-- | src/history.c | 12 |
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 | ||
302 | void 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 | |||
302 | size_t pruneLeastImportant_History(iHistory *d) { | 314 | size_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; |