- * @param integer|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
- * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
+ * @param int|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
+ * @param bool|null $cacheEnabled Sets if the cache should be enabled or not.
- * @param integer|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
- * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
+ * @param int|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
+ * @param bool|null $cacheEnabled Sets if the cache should be enabled or not.
*/
public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
if ( is_null( $this->hasCached ) ) {
*/
public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
if ( is_null( $this->hasCached ) ) {
'cachedspecial-viewing-cached-ttl',
$context->getLanguage()->formatDuration( $this->cacheExpiry )
)->escaped();
'cachedspecial-viewing-cached-ttl',
$context->getLanguage()->formatDuration( $this->cacheExpiry )
)->escaped();
- wfWarn( "Attempted to get item with non-numeric key while the next item in the queue has a key ($itemKey) in " . __METHOD__ );
- }
- elseif ( is_null( $itemKey ) ) {
+ wfWarn( "Attempted to get item with non-numeric key while " .
+ "the next item in the queue has a key ($itemKey) in " . __METHOD__ );
+ } elseif ( is_null( $itemKey ) ) {
if ( array_key_exists( $key, $this->cachedChunks ) ) {
$value = $this->cachedChunks[$key];
unset( $this->cachedChunks[$key] );
if ( array_key_exists( $key, $this->cachedChunks ) ) {
$value = $this->cachedChunks[$key];
unset( $this->cachedChunks[$key] );
*/
public function saveCache() {
if ( $this->cacheEnabled && $this->hasCached === false && !empty( $this->cachedChunks ) ) {
*/
public function saveCache() {
if ( $this->cacheEnabled && $this->hasCached === false && !empty( $this->cachedChunks ) ) {
- wfGetCache( CACHE_ANYTHING )->set( $this->getCacheKeyString(), $this->cachedChunks, $this->cacheExpiry );
+ wfGetCache( CACHE_ANYTHING )->set(
+ $this->getCacheKeyString(),
+ $this->cachedChunks,
+ $this->cacheExpiry
+ );
*/
public function setOnInitializedHandler( $handlerFunction ) {
$this->onInitHandler = $handlerFunction;
}
*/
public function setOnInitializedHandler( $handlerFunction ) {
$this->onInitHandler = $handlerFunction;
}