diff --git a/src/Query/ResultsCache.php b/src/Query/ResultsCache.php
index 6ef369d..22bd88e 100644
--- a/src/Query/ResultsCache.php
+++ b/src/Query/ResultsCache.php
@@ -81,6 +81,17 @@ public function getResults($search_id) {
   /**
    * {@inheritdoc}
    */
+  public function getAllResults() {
+    $request = $this->getCurrentRequest();
+    if (isset($this->results[$request])) {
+      return $this->results[$request];
+    }
+    return array();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function removeResults($search_id) {
     $request = $this->getCurrentRequest();
     if (isset($this->results[$request])) {
diff --git a/src/Query/ResultsCacheInterface.php b/src/Query/ResultsCacheInterface.php
index 76c72e1..cbdd509 100644
--- a/src/Query/ResultsCacheInterface.php
+++ b/src/Query/ResultsCacheInterface.php
@@ -27,6 +27,15 @@ public function addResults(ResultSetInterface $results);
   public function getResults($search_id);
 
   /**
+   * Retrieves all results data cached in this request.
+   *
+   * @return \Drupal\search_api\Query\ResultSetInterface[]
+   *   The results of all searches cached in this service, keyed by their
+   *   search IDs.
+   */
+  public function getAllResults();
+
+  /**
    * Removes the result set with the given search ID from the cache.
    *
    * @param string $search_id
diff --git a/tests/src/Kernel/QueryTest.php b/tests/src/Kernel/QueryTest.php
index 035665c..1ae762e 100644
--- a/tests/src/Kernel/QueryTest.php
+++ b/tests/src/Kernel/QueryTest.php
@@ -193,4 +193,31 @@ public function testQuerySerialization() {
     $this->assertEquals($cloned_query, $unserialized_query);
   }
 
+  /**
+   * Tests that the results cache works correctly.
+   */
+  public function testResultsCache() {
+    /** @var \Drupal\search_api\Query\QueryInterface[] $results */
+    $results = array();
+    $search_ids = array('foo', 'bar');
+    foreach ($search_ids as $search_id) {
+      $results[$search_id] = $this->index->query()
+        ->setSearchId($search_id)
+        ->execute();
+    }
+
+    $results_cache = \Drupal::getContainer()
+      ->get('search_api.results_static_cache');
+    foreach ($search_ids as $search_id) {
+      $this->assertSame($results[$search_id], $results_cache->getResults($search_id));
+    }
+    $this->assertNull($results_cache->getResults('foobar'));
+
+    $this->assertSame($results, $results_cache->getAllResults());
+
+    $results_cache->removeResults('foo');
+    unset($results['foo']);
+    $this->assertSame($results, $results_cache->getAllResults());
+  }
+
 }
