Only in cdn/: .DS_Store diff -up cdn.current/cdn.admin.inc cdn/cdn.admin.inc --- cdn.current/cdn.admin.inc 2010-10-21 15:45:33.000000000 +0100 +++ cdn/cdn.admin.inc 2010-11-23 13:47:57.000000000 +0000 @@ -239,6 +239,21 @@ function cdn_admin_other_settings_form(& '#process' => array('ctools_dependent_process'), ); + $form['versioned_objects'] = array( + '#type' => 'fieldset', + '#title' => t('Versioned Objects'), + '#description' => t('Allows for objects to be versioned, thus allowing more consistent cache invalidation with new deployments'), + ); + $form['versioned_objects'][CDN_VERSIONED_OBJECTS_VARIABLE] = array( + '#type' => 'checkbox', + '#title' => t('Enable versioned objects'), + '#description' => t( + 'Objects are verioned to allow for better cache object invalidation - requires .htaccess patch' + ), + '#default_value' => variable_get(CDN_VERSIONED_OBJECTS_VARIABLE, CDN_DISABLED), + '#process' => array('ctools_dependent_process'), + ); + $path_explanation = t( "Enter one file pattern per line. The '*' character is a wildcard.
Example file patterns are *.js for all JavaScript files and diff -up cdn.current/cdn.module cdn/cdn.module --- cdn.current/cdn.module 2010-10-29 13:19:09.000000000 +0100 +++ cdn/cdn.module 2010-11-23 13:48:40.000000000 +0000 @@ -21,6 +21,7 @@ define('CDN_MODE_VARIABLE', 'cdn_mode'); define('CDN_MODE_BASIC', 'basic'); define('CDN_MODE_ADVANCED', 'advanced'); define('CDN_STATUS_VARIABLE', 'cdn_status'); +define('CDN_VERSIONED_OBJECTS_VARIABLE', 'cdn_versioned_objects'); define('CDN_STATS_VARIABLE', 'cdn_stats'); define('CDN_DRUPAL_ROOT_VARIABLE', 'cdn_drupal_root'); define('CDN_HTTPS_SUPPORT_VARIABLE', 'cdn_https_support'); @@ -106,6 +107,10 @@ function cdn_file_url_alter(&$path) { cdn_load_include('stats'); $start = microtime(); } + + if($versioned_objects){ + $path = 'cdn/'.filemtime($path).'/'.$path; + } // Load the include file that contains the logic for the mode that's // currently enabled. Common subdirectories: cdn.current/patches and cdn/patches