/** * Add some HTML to be cached. * This is done by providing a callback function that should * return the HTML to be added. It will only be called if the * item is not in the cache yet or when the cache has been invalidated. * * @since 1.20 * * @param callable $computeFunction * @param array $args * @param string|null $key */ public function addCachedHTML($computeFunction, $args = array(), $key = null) { $this->getOutput()->addHTML($this->cacheHelper->getCachedValue($computeFunction, $args, $key)); }