mirror of
https://github.com/curl/curl.git
synced 2026-06-01 22:14:17 +03:00
cookies: track expiration in jar to optimize removals
Removing expired cookies needs to be a fast operation since we want to be able to perform it often and speculatively. By tracking the timestamp of the next known expiration we can exit early in case the timestamp is in the future. Closes: #7172 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
This commit is contained in:
parent
3d01b75077
commit
1bd4b3f4e2
2 changed files with 36 additions and 1 deletions
|
|
@ -65,6 +65,7 @@ struct CookieInfo {
|
|||
bool running; /* state info, for cookie adding information */
|
||||
bool newsession; /* new session, discard session cookies on load */
|
||||
int lastct; /* last creation-time used in the jar */
|
||||
curl_off_t next_expiration; /* the next time at which expiration happens */
|
||||
};
|
||||
|
||||
/* This is the maximum line length we accept for a cookie line. RFC 2109
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue