File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,6 +247,20 @@ contained :class:`Cookie` objects.
247247 Note that the :meth: `save ` method won't save session cookies anyway, unless you
248248 ask otherwise by passing a true *ignore_discard * argument.
249249
250+
251+ .. method :: CookieJar.clear_expired_cookies()
252+
253+ Discard all expired cookies.
254+
255+ Discards all contained cookies that have a true :attr: `is_expired ` attribute
256+ (usually because their expiration time have passed)
257+
258+ You probably don't need to call this method because expired cookies are never
259+ sent back to the server (provided you're using :class: `DefaultCookiePolicy `),
260+ this method is called by :class: `CookieJar ` itself every so often, and the
261+ :meth: `save ` method won't save expired cookies anyway (unless you ask
262+ otherwise by passing a true *ignore_expires * argument).
263+
250264:class: `FileCookieJar ` implements the following additional methods:
251265
252266
You can’t perform that action at this time.
0 commit comments