diff --git a/src/Form/PageCacheExclusionConfigForm.php b/src/Form/PageCacheExclusionConfigForm.php
index 24d2e26..b620e06 100644
--- a/src/Form/PageCacheExclusionConfigForm.php
+++ b/src/Form/PageCacheExclusionConfigForm.php
@@ -34,7 +34,7 @@ class PageCacheExclusionConfigForm extends ConfigFormBase {
       '#type' => 'textarea',
       '#title' => $this->t('Exclude cache for page variation with query parameters'),
       '#default_value' => $config->get('page_query_parameters_list'),
-      '#description' => $this->t('List of Pages to exclude from cache in case query parameters are present (one page per line).'),
+      '#description' => $this->t('List of Pages to exclude from cache in case query parameters are present (one page per line). You may optionally add "|x" after a path to exclude the page only if the number of query parameters is greater than x. Example: "/search|2". Without "|x", the default behavior is "|0".'),
     ];
 
     $form['page_list'] = [
diff --git a/src/StackMiddleware/PageCacheAlter.php b/src/StackMiddleware/PageCacheAlter.php
index 4f1edff..1110209 100644
--- a/src/StackMiddleware/PageCacheAlter.php
+++ b/src/StackMiddleware/PageCacheAlter.php
@@ -77,14 +77,52 @@ class PageCacheAlter extends PageCache {
     }
 
     $pageQueryParametersList = $this->config->get('page_query_parameters_list');
+    $paths = preg_split('/\r\n|\r|\n/', $pageQueryParametersList);
+
     $queryParameters = $request->query->all();
-    $matched = $this->pathMatcher->matchPath($path_alias, $pageQueryParametersList) || (($path != $path_alias) && $this->pathMatcher->matchPath($path, $pageQueryParametersList));
-    if ($matched && $queryParameters) {
-      return;
+    $query_count = count($queryParameters);
+
+    foreach ($paths as $line) {
+      [$configured_path, $limit] = $this->parsePathAndLimit($line);
+
+      if ($configured_path === NULL) {
+        continue;
+      }
+
+      $matched =
+        $this->pathMatcher->matchPath($path_alias, $configured_path)
+        || (
+          ($path !== $path_alias)
+          && $this->pathMatcher->matchPath($path, $configured_path)
+        );
+
+      if ($matched && $query_count > $limit) {
+        return FALSE;
+      }
     }
 
     $cid = $this->getCacheId($request);
     $this->cache->set($cid, $response, $expire, $tags);
   }
 
+  private function parsePathAndLimit(string $line): array {
+    $line = trim($line);
+
+    if ($line === '') {
+      return [NULL, NULL];
+    }
+
+    // Compatibility : no |x means $limit = 0
+    if (strpos($line, '|') === FALSE) {
+      return [$line, 0];
+    }
+
+    [$path, $limit] = explode('|', $line, 2);
+
+    $path = trim($path);
+    $limit = is_numeric($limit) ? (int) $limit : 0;
+
+    return [$path, $limit];
+  }
+
 }
