diff --git a/advagg.module b/advagg.module
index 5621a35..b3905b1 100644
--- a/advagg.module
+++ b/advagg.module
@@ -869,7 +869,8 @@ function advagg_get_filename($files, $filetype, $counter = FALSE, $bundle_md5 =
   $run_alter = FALSE;
   if (empty($bundle_md5)) {
     // Create bundle md5
-    $bundle_md5 = md5(implode('', $files));
+    $schema = advagg_get_server_schema();
+    $bundle_md5 = md5($schema . implode('', $files));
     $run_alter = TRUE;
 
     // Record root request in db.
@@ -1041,7 +1042,8 @@ function advagg_find_existing_bundle(&$files, &$bundle_md5) {
   // Sort files for better cache hits.
   $temp_files = $files;
   sort($temp_files);
-  $cached_data_key = 'advagg_existing_' . md5(implode('', $temp_files));
+  $schema = advagg_get_server_schema();
+  $cached_data_key = 'advagg_existing_' . md5($schema . implode('', $temp_files));
 
   // Try cache first; cache table is cache_advagg_bundle_reuse. string is debug name.
   $cached_data = advagg_cached_bundle_get($cached_data_key, 'advagg_find_existing_bundle');
@@ -2504,7 +2506,8 @@ function advagg_css_js_file_builder($type, $files, $query_string = '', $counter
   $data = '';
 
   // Try cache first. When ever the counter changes this cache gets reset.
-  $cached_data_key = 'advagg_file_builder_' . md5(implode('', array_filter(array_unique($files))));
+  $schema = advagg_get_server_schema();
+  $cached_data_key = 'advagg_file_builder_' . md5($schema . implode('', array_filter(array_unique($files))));
   if (!$force) {
     // Try cache first; cache table is cache_advagg_bundle_reuse.
     $cached_data = advagg_cached_bundle_get($cached_data_key, 'file_builder_cache_object');
@@ -2677,7 +2680,7 @@ function advagg_css_js_file_builder($type, $files, $query_string = '', $counter
 
   // Cache the output
   if (!$force && $cacheable) {
-    $new_cached_data_key = 'advagg_file_builder_' . md5(implode('', array_filter(array_unique($files_used))));
+    $new_cached_data_key = 'advagg_file_builder_' . md5($schema . implode('', array_filter(array_unique($files_used))));
     // Verify the files in equals the files out.
     if ($new_cached_data_key == $cached_data_key) {
       cache_set($cached_data_key, $output, 'cache_advagg_bundle_reuse', CACHE_TEMPORARY);
diff --git a/advagg_bundler/advagg_bundler.module b/advagg_bundler/advagg_bundler.module
index eb95df3..5f58641 100644
--- a/advagg_bundler/advagg_bundler.module
+++ b/advagg_bundler/advagg_bundler.module
@@ -58,6 +58,7 @@ function advagg_bundler_advagg_filenames_alter(&$filenames) {
   // Get max number of sub aggregates to create.
   $max_css = variable_get('advagg_bundler_max_css', ADVAGG_BUNDLER_MAX_CSS);
   $max_js = variable_get('advagg_bundler_max_js', ADVAGG_BUNDLER_MAX_JS);
+  $schema = advagg_get_server_schema();
 
   $output = array();
   foreach ($filenames as $values) {
@@ -145,7 +146,7 @@ function advagg_bundler_advagg_filenames_alter(&$filenames) {
     $data = array();
     foreach ($groupings as $bundle) {
       $values['files'] = $bundle;
-      $values['bundle_md5'] = md5(implode('', $bundle));
+      $values['bundle_md5'] = md5($schema . implode('', $bundle));
       $data[] = $values;
       $output[] = $values;
     }
