Assert::parameter( $maxKeys > 0, '$maxKeys', 'must be above zero' );
$this->maxCacheKeys = $maxKeys;
- // Use the current time as the default "as of" timesamp of entries
+ // Use the current time as the default "as of" timestamp of entries
$this->epoch = $this->getCurrentTime();
}
}
if ( !is_array( $this->cache[$key] ) ) {
- throw new UnexpectedValueException( "The value of '$key' is not an array." );
+ $type = gettype( $this->cache[$key] );
+
+ throw new UnexpectedValueException( "The value of '$key' ($type) is not an array." );
}
$this->cache[$key][$field] = $value;