I know pywikibot does some kind of API cacheing, but I can't find any details of what it keys on and how deterministic it is.
The behavior I want is "I know the revid from the last time I fetched this page. Either give that to me out of the cache, or fetch the latest version and update the cache with that".
Hi Roy,
From what I understand, there are 2 levels of caching: api caching (persistent) and in memory object-caching, which implies you have access to the BasePage object. Xqt can probably give you more details on the one that is of interest to you.
Either way, even if pwb doesn't have this feature, it should be trivial to implement. However, I'd like to point out that the way you described it makes it sound extremely dangerous.
Assume you have a revid. For some reason, you get around to processing it after a few minutes (or days...). The respective revision could have been reverted, deleted or suppressed and other changes could have occurred. If you need to change the page, you might end up reintroducing garbage. If at any point you want to make edits to the page, you should make sure you use the latest content.
If you want to skip processing unchanged pages, there is a better way to do it: just fetch the pages using an EdittimeFilterPageGenerator (and save the revision timestamp)
HTH, Strainu
Pe duminică, 22 martie 2026, Roy Smith via pywikibot < pywikibot@lists.wikimedia.org> a scris:
I know pywikibot does some kind of API cacheing, but I can't find any details of what it keys on and how deterministic it is.
The behavior I want is "I know the revid from the last time I fetched this page. Either give that to me out of the cache, or fetch the latest version and update the cache with that". _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@ lists.wikimedia.org/message/YKJEE75H64GJJ2KVJMKO5DL7XV62JSBZ/ To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org