* The metadata field is actually defaulting to "" not null.
Change-Id: I745441c7061494db26de7f64dda30b80171c9443
* @return bool Whether to cache in RepoGroup (this avoids OOMs)
*/
function isCacheable() {
- $this->load(); // if loaded from cache, metadata will be null if it didn't fit
- return $this->metadata !== null
+ $this->load();
+ // If extra data (metadata) was not loaded then it must have been large
+ return $this->extraDataLoaded
&& strlen( serialize( $this->metadata ) ) <= self::CACHE_FIELD_MAX_LEN;
}