r103212 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103211‎ | r103212 | r103213 >
Date:19:22, 15 November 2011
Author:yaron
Status:ok
Tags:
Comment:
Minor fix to r102726 - changed "formdefinition" to "form definition"
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -854,10 +854,10 @@
855855 // Cache hit?
856856 if ( $cached_def !== false && $cached_def !== null ) {
857857
858 - wfDebug( "Cache hit: Got formdefinition $cachekey from cache\n" );
 858+ wfDebug( "Cache hit: Got form definition $cachekey from cache\n" );
859859 return $cached_def;
860860 } else {
861 - wfDebug( "Cache miss: Formdefinition $cachekey not found in cache\n" );
 861+ wfDebug( "Cache miss: Form definition $cachekey not found in cache\n" );
862862 }
863863
864864 }
@@ -895,11 +895,11 @@
896896 if ( $sfgCacheFormDefinitions && $form_id !== null ) {
897897
898898 if ( $output->getCacheTime() == -1 ) {
899 - wfDebug( "Caching disabled for formdefinition $cachekey\n" );
 899+ wfDebug( "Caching disabled for form definition $cachekey\n" );
900900 self::purgeCache( $form_article );
901901 } else {
902902 wfGetMainCache()->add( $cachekey, $form_def );
903 - wfDebug( "Cached formdefinition $cachekey\n" );
 903+ wfDebug( "Cached form definition $cachekey\n" );
904904 }
905905
906906 }
@@ -908,20 +908,19 @@
909909 }
910910
911911 /**
912 - * Deletes the formdefinition associated with the given wikipage from the
913 - * main cache.
 912+ * Deletes the form definition associated with the given wiki page
 913+ * from the main cache.
914914 *
915915 * @param Page $wikipage
916916 * @return Bool
917917 */
918918 public static function purgeCache ( &$wikipage ) {
919 -
920919 if ( $wikipage->getTitle()->getNamespace() == SF_NS_FORM ) {
921920
922921 $key = wfMemcKey('ext.SemanticForms.formdefinition', $wikipage->getId() );
923922
924923 if ( self::getFormCache()->delete($key) ) {
925 - wfDebug( "Deleted cached formdefinition $key.\n" );
 924+ wfDebug( "Deleted cached form definition $key.\n" );
926925 }
927926 }
928927

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102726Enable caching for formdefinitionsfoxtrott00:20, 11 November 2011

Status & tagging log