MediaWiki REL1_28
|
Abstract special page class with scaffolding for caching HTML and other values in a single blob. More...
Go to the source code of this file.
Classes | |
class | SpecialCachedPage |
Abstract special page 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!
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 (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
Definition in file SpecialCachedPage.php.