Mpaa created this task. Mpaa added a subscriber: Mpaa. Mpaa added a project: pywikibot-core. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION At the first call, page.text or page.get() submit two similar requests. Moreover, page.get() does not use cached data as commented in code but reload every time the page.
This is due to the use of page.latest_revision.text in get().
[debug print inserted in request.submit()]
```
page.text
SUBMIT /w/api.php?continue=&rvprop=ids|flags|timestamp|user|comment|content&prop=info|revisions&titles=User:Mpaa/y&indexpageids=&action=query SUBMIT /w/api.php?action=query&meta=userinfo&uiprop=blockinfo|hasmsg|groups|rights SUBMIT /w/api.php?continue=&rvprop=ids|flags|timestamp|user|comment|content&prop=info|revisions&action=query&titles=User:Mpaa/y&indexpageids=&rvlimit=1&rvdir=older u'yet another' ```
TASK DETAIL https://phabricator.wikimedia.org/T97960
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Mpaa Cc: pywikipedia-bugs, Aklapper, Mpaa, jayvdb
XZise added a subscriber: XZise. XZise added a comment.
It seems that we need to add the cache check from getInternals to latest_revision or similar:
if not hasattr(self, "_revid") \ or self._revid not in self._revisions \ or self._revisions[self._revid].text is None:
TASK DETAIL https://phabricator.wikimedia.org/T97960
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: XZise, Aklapper, Mpaa, jayvdb, pywikipedia-bugs
XZise claimed this task.
TASK DETAIL https://phabricator.wikimedia.org/T97960
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: XZise, Aklapper, Mpaa, jayvdb, pywikipedia-bugs
gerritbot added a subscriber: gerritbot. gerritbot added a comment.
Change 208574 had a related patch set uploaded (by XZise): [FIX] Page: Return cached text if possible
https://gerrit.wikimedia.org/r/208574
TASK DETAIL https://phabricator.wikimedia.org/T97960
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise, gerritbot Cc: gerritbot, XZise, Aklapper, Mpaa, jayvdb, pywikipedia-bugs
gerritbot added a project: Patch-For-Review.
TASK DETAIL https://phabricator.wikimedia.org/T97960
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise, gerritbot Cc: gerritbot, XZise, Aklapper, Mpaa, jayvdb, pywikipedia-bugs
gerritbot added a comment.
Change 208574 merged by jenkins-bot: [FIX] Page: Return cached text if possible
https://gerrit.wikimedia.org/r/208574
TASK DETAIL https://phabricator.wikimedia.org/T97960
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise, gerritbot Cc: gerritbot, XZise, Aklapper, Mpaa, jayvdb, pywikipedia-bugs
XZise closed this task as "Resolved".
TASK DETAIL https://phabricator.wikimedia.org/T97960
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: gerritbot, XZise, Aklapper, Mpaa, jayvdb, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org