- public function getField( $key, $field ) {
- return $this->get( $key )[$field] ?? null;
+ /**
+ * @param string|int $key
+ * @param string|int $field
+ * @param float $maxAge Ignore items older than this many seconds [optional] (since 1.32)
+ * @return mixed Returns null if the key was not found or is older than $maxAge
+ */
+ public function getField( $key, $field, $maxAge = 0.0 ) {
+ if ( !$this->hasField( $key, $field, $maxAge ) ) {
+ return null;
+ }
+
+ return $this->cache[$key][$field];