AndyRussG has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92335
Change subject: Disable institution-page cache when logged in
......................................................................
Disable institution-page cache when logged in
The caching of institution pages may confuse users, since changes they make
using controls on this page may not show up right away, and users may not
notice or understand the message saying that they're viewing a cached version
of the page. There is no need to change the behavior for anonymous users, since
said controls are only available to logged-in users with certain privilges. It
seems unlikely that this change will cause performance issues.
Change-Id: I8ed3e9fc1e16dc4da58d02f2596560262c546e25
---
M includes/actions/ViewOrgAction.php
1 file changed, 4 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram
refs/changes/35/92335/1
diff --git a/includes/actions/ViewOrgAction.php
b/includes/actions/ViewOrgAction.php
index 79b09cd..4a29b07 100644
--- a/includes/actions/ViewOrgAction.php
+++ b/includes/actions/ViewOrgAction.php
@@ -31,6 +31,10 @@
* @see FormlessAction::onView()
*/
public function onView() {
+ // Only cache for anon users, to avoid potential confusion due
to
+ // cahced versions
+ $this->cacheEnabled = $this->cacheEnabled &&
$this->getUser()->isAnon();
+
if ( $this->getUser()->isAllowed( 'ep-course' ) ) {
$this->getOutput()->addModules( 'ep.addcourse' );
}
--
To view, visit https://gerrit.wikimedia.org/r/92335
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ed3e9fc1e16dc4da58d02f2596560262c546e25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits