diff --git a/varnish.drush.inc b/varnish.drush.inc
index 2f165b8..8e993ee 100644
--- a/varnish.drush.inc
+++ b/varnish.drush.inc
@@ -34,6 +34,7 @@ function varnish_drush_command() {
  * @param string $paths a space separated list of paths.
  */
 function varnish_drush_purge($paths) {
+  $host = _varnish_get_host();
   $paths = explode(' ', $paths);
-  varnish_expire_cache($paths);
+  varnish_purge_paths($host, $paths);
 }
diff --git a/varnish.module b/varnish.module
index 2d27d59..86b6b51 100644
--- a/varnish.module
+++ b/varnish.module
@@ -149,10 +149,7 @@ function varnish_user($op, &$edit, &$account, $category = NULL) {
  */
 function varnish_expire_cache($paths) {
   $host = _varnish_get_host();
-  $base = base_path();
-  $purge = implode('$|^'. $base, $paths);
-  $purge = '^'. $base . $purge .'$';
-  varnish_purge($host, $purge);
+  varnish_purge_paths($host, $paths);
 }
 
 /**
@@ -201,7 +198,9 @@ function varnish_purge_all_pages() {
 }
 
 /**
- * Helper function to purge items for a host that matches the provided pattern.
+ * Helper function to purge items for a host that matches the provided paths or pattern.
+ * Take care to limit the length of $pattern to params.cli_buffer on your Varnish server, otherwise
+ * Varnish will truncate the command. Use varnish_purge_paths() to protect you from this, if applicable.
  * @param string $host the host to purge.
  * @param string $pattern the pattern to look for and purge.
  */
@@ -225,6 +224,31 @@ function varnish_purge($host, $pattern) {
 }
 
 /**
+ * Helper function that wraps around varnish_purge() and compiles a regular expression of all paths
+ * supplied to it. This function takes care to chunk commands into no more than 7500 bytes each, to avoid hitting params.cli_buffer.
+ * @param string $host the host to purge.
+ * @param array the paths (no leading slash) to purge for this host.
+ */
+function varnish_purge_paths($host, $paths) {
+  // subtract the hostname length from the global length limit. Note we use strlen() because we're counting bytes, not characters.
+  $length_limit = variable_get('varnish_cmdlength_limit', 7500) - strlen($host);
+  $base_path = base_path();
+
+  while (!empty($paths)) {
+    // Construct patterns and send them to the server when they're full
+    $purge_pattern = '^';
+    while (strlen($purge_pattern) < $length_limit && !empty($paths)) {
+      $purge_pattern .= $base_path.array_shift($paths).'$|^';
+    }
+    // chop the final "|^" off the string, leaving "$"
+    $purge_pattern = substr($purge_pattern, 0, -2);
+
+    // Submit this purge chunk
+    varnish_purge($host, $purge_pattern);
+  }
+}
+
+/**
  * Get the status (up/down) of each of the varnish servers.
  *
  * @return An array of server statuses, keyed by varnish terminal addresses.
