Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / devel / webprofiler / src / State / StateWrapper.php
index f42e66f358894c9d3d4531acad741b0bd14cb029..23f930ad40ed1fbd9b5547f15d314c33279601d1 100644 (file)
@@ -2,13 +2,14 @@
 
 namespace Drupal\webprofiler\State;
 
+use Drupal\Core\Cache\CacheCollector;
 use Drupal\Core\State\StateInterface;
 use Drupal\webprofiler\DataCollector\StateDataCollector;
 
 /**
  * Class StateWrapper.
  */
-class StateWrapper implements StateInterface {
+class StateWrapper extends CacheCollector implements StateInterface {
 
   /**
    * The system state.
@@ -92,6 +93,20 @@ class StateWrapper implements StateInterface {
     $this->state->resetCache();
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function resolveCacheMiss($key) {
+    return $this->state->resolveCacheMiss($key);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function destruct() {
+    $this->updateCache();
+  }
+
   /**
    * Passes through all non-tracked calls onto the decorated object.
    *