:100644 100644 9439756... 0000000... M	bundlecache.module
:100644 100644 65fd15d... 0000000... M	bundlecache_hooks.php

diff --git bundlecache.module bundlecache.module
index 9439756..91d099d 100644
--- bundlecache.module
+++ bundlecache.module
@@ -250,6 +250,7 @@ function bundlecache_process_file_list($kind = NULL, &$variables = NULL, $raw_fi
         && $files[$file]['bid'] != BUNDLECACHE_UNBUNDLED
         && !empty($bundles[$kind][$files[$file]['bid']]['processed'])
         && $bundles[$kind][$files[$file]['bid']]['enabled']) {
+      drupal_alter('bundlecache_process_file', $bundles[$kind][$files[$file]['bid']]);
       $aggregated = $bundles[$kind][$files[$file]['bid']]['processed'];
 
       // Load additional meta data from the bundle.
@@ -262,6 +263,7 @@ function bundlecache_process_file_list($kind = NULL, &$variables = NULL, $raw_fi
       }
       elseif (!empty($files[$file]['processed'])) {
         // This file is a single, optionally minified file.
+        drupal_alter('bundlecache_process_file', $files[$file]);
         $aggregated = $files[$file]['processed'];
 
         // Add (optional) additional meta data from the file storage.
diff --git bundlecache_hooks.php bundlecache_hooks.php
index 65fd15d..f84e456 100644
--- bundlecache_hooks.php
+++ bundlecache_hooks.php
@@ -209,5 +209,15 @@ function hook_bundlecache_composite_modify($obj, $filepath, $files, &$content) {
 }
 
 /**
+ * Allows modification of composite file details at render time.
+ *
+ * This can be used to alter the URL that is output for a bundle file.
+ * Called from bundlecache_process_file_list()
+ */
+function hook_bundlecache_process_file_alter(&$file) {
+  $file['processed'] = 'http://www'.rand(1,4).'.cdn.example.com/'.$file['processed'];
+}
+
+/**
  * @} End of "addtogroup hooks".
  */
