XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/200301
Change subject: [IMRPOV] CachedRequest: Cap expiry time by config ...................................................................... [IMRPOV] CachedRequest: Cap expiry time by config This prevents any caches longer than the configured time even if they are using a higher number. Change-Id: Iab9fa866fe1c235455d02095a83fb83fb40fbb07 --- M pywikibot/data/api.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/01/200301/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 71cc0a9..70e512b 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1723,7 +1723,7 @@ super(CachedRequest, self).__init__(*args, **kwargs) if not isinstance(expiry, datetime.timedelta): expiry = datetime.timedelta(expiry) - self.expiry = expiry + self.expiry = min(expiry, datetime.timedelta(config.API_config_expiry)) self._data = None self._cachetime = None -- To view, visit https://gerrit.wikimedia.org/r/200301 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab9fa866fe1c235455d02095a83fb83fb40fbb07 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise <commodorefabia...@gmx.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits