* @return bool
*/
public function isMergeableKey( $key ) {
- if ( !isset( $this->mergeableKeys ) ) {
+ if ( $this->mergeableKeys === null ) {
$this->mergeableKeys = array_flip( array_merge(
self::$mergeableMapKeys,
self::$mergeableListKeys,
* need to fetch all of the subitems from the cache individually.
* @param $code
* @param $key
- * @return string
+ * @return mixed
*/
public function getItem( $code, $key ) {
if ( !isset( $this->loadedItems[$code][$key] ) ) {
$deps = $this->store->get( $code, 'deps' );
$keys = $this->store->get( $code, 'list', 'messages' );
- // 'list:messages' sometimes expires separately of 'deps' in LCStore_Accel
- if ( $deps === null || $keys === null ) {
+ $preload = $this->store->get( $code, 'preload' );
+ // Different keys may expire separately, at least in LCStore_Accel
+ if ( $deps === null || $keys === null || $preload === null ) {
wfDebug( __METHOD__."($code): cache missing, need to make one\n" );
return true;
}
/**
* @param $code
* @param $key
- * @return string
+ * @return mixed
*/
public function getItem( $code, $key ) {
unset( $this->mruLangs[$code] );