r73503 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73502‎ | r73503 | r73504 >
Date:00:27, 22 September 2010
Author:dale
Status:deferred
Tags:
Comment:
added 3600 cache time to parse and search timed text requests. This means timedText updates will be delayed by up to one hour but should be more gentle on the apaches when lots of people play back the same video clip.
Modified paths:
  • /branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js
@@ -1165,7 +1165,9 @@
11661166 loadTitleKey: function( titleKey, callback ) {
11671167 var request = {
11681168 'action': 'parse',
1169 - 'page': titleKey
 1169+ 'page': titleKey,
 1170+ 's-maxage' : 3600,
 1171+ 'maxage' : 3600
11701172 };
11711173 mw.getJSON( this.apiUrl, request, function( data ) {
11721174 if ( data && data.parse && data.parse.text['*'] ) {
@@ -1209,7 +1211,9 @@
12101212 'apprefix' : titleKey,
12111213 'apnamespace' : this.getTimedTextNS(),
12121214 'aplimit' : 200,
1213 - 'prop':'revisions'
 1215+ 'prop':'revisions',
 1216+ 's-maxage' : 3600,
 1217+ 'maxage' : 3600
12141218 };
12151219 mw.getJSON( this.apiUrl, request, function( sourcePages ) {
12161220 // If "timedText" is not a valid namespace try "just" with prefix:

Status & tagging log