From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/actions/CachedAction.php | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'includes/actions/CachedAction.php') diff --git a/includes/actions/CachedAction.php b/includes/actions/CachedAction.php index d21f9aeb..bfdda7b9 100644 --- a/includes/actions/CachedAction.php +++ b/includes/actions/CachedAction.php @@ -1,22 +1,8 @@ getCachedValue( $callback ); - * - * To add HTML that should be cached, use addCachedHTML like this: - * $this->addCachedHTML( $callback ); - * - * The callback function is only called when needed, so do all your expensive - * computations here. This function should returns the HTML to be cached. - * It should not add anything to the PageOutput object! - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -33,10 +19,30 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @ingroup Action + * @ingroup Actions * @author Jeroen De Dauw < jeroendedauw@gmail.com > * @since 1.20 */ + +/** + * Abstract action class with scaffolding for caching HTML and other values + * in a single blob. + * + * Before using any of the caching functionality, call startCache. + * After the last call to either getCachedValue or addCachedHTML, call saveCache. + * + * To get a cached value or compute it, use getCachedValue like this: + * $this->getCachedValue( $callback ); + * + * To add HTML that should be cached, use addCachedHTML like this: + * $this->addCachedHTML( $callback ); + * + * The callback function is only called when needed, so do all your expensive + * computations here. This function should returns the HTML to be cached. + * It should not add anything to the PageOutput object! + * + * @ingroup Actions + */ abstract class CachedAction extends FormlessAction implements ICacheHelper { /** -- cgit v1.2.2