UltrasonicNXT has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/110691

Change subject: Add cache time for avatars
......................................................................

Add cache time for avatars

Does it even do anything to cache something with no time? Anyway, I've
been having problems with this, so I think simply specifiying a time
should fix it.

Change-Id: Ia1a145047182c608370650196fc8c8510ff789dd
---
M UserProfile/AvatarClass.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/91/110691/1

diff --git a/UserProfile/AvatarClass.php b/UserProfile/AvatarClass.php
index 08ffba5..0e8b7ed 100644
--- a/UserProfile/AvatarClass.php
+++ b/UserProfile/AvatarClass.php
@@ -49,14 +49,14 @@
                        } else {
                                $avatar_filename = basename( $files[0] ) . 
'?r=' . filemtime( $files[0] );
                        }
-                       $wgMemc->set( $key, $avatar_filename );
+                       $wgMemc->set( $key, $avatar_filename, 60 * 60 * 24 ); 
// cache for 24 hours
                }
                return $avatar_filename;
        }
 
-       /** 
+       /**
         * @param Array $extraParams: array of extra parameters to give to the 
image
-        * @return String: <img> HTML tag with full path to the avatar image 
+        * @return String: <img> HTML tag with full path to the avatar image
         * */
        function getAvatarURL( $extraParams = array() ) {
                global $wgUploadPath;

-- 
To view, visit https://gerrit.wikimedia.org/r/110691
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1a145047182c608370650196fc8c8510ff789dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to