Title: Feature Request: Add Query String for Cache Busting
Last modified: August 5, 2019

---

# Feature Request: Add Query String for Cache Busting

 *  Resolved [heyjoecampbell](https://wordpress.org/support/users/heyjoecampbell/)
 * (@heyjoecampbell)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/feature-request-add-query-string-for-cache-busting/)
 * It would be ideal if the plugin offered cache busting capabilities. A simple 
   parameter to append a sequential query string would be ideal.
 * Here’s a mockup I created for illustration purposes:
    [https://cl.ly/7d39353a92af](https://cl.ly/7d39353a92af)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [ShortPixel](https://wordpress.org/support/users/shortpixel/)
 * (@shortpixel)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/feature-request-add-query-string-for-cache-busting/#post-11807693)
 * Hey [@heyjoecampbell](https://wordpress.org/support/users/heyjoecampbell/) – 
   thanks for taking the time to suggest us this feature.
 * We’ll consider it for a future update but we’re not yet sure the amount of work
   this would involve vs. the benefits.
 * Regards,
    Alex
 *  Thread Starter [heyjoecampbell](https://wordpress.org/support/users/heyjoecampbell/)
 * (@heyjoecampbell)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/feature-request-add-query-string-for-cache-busting/#post-11807844)
 * I understand – In the meantime, I have modified a function snippet to append 
   a timestamp to all uploaded media:
 *     ```
       function append_media_timestamp($filename) {
   
       	$timestamp = date("YmdGs");
       	$append = apply_filters('usp_file_append_random', true, $filename, $random);
   
       	if (!$append) return $filename;
   
       	$info = pathinfo($filename);
       	$ext  = (isset($info['extension']) && !empty($info['extension'])) ? '.'. $info['extension'] : '';
       	$name = basename($filename, $ext) .'-'. $timestamp;
   
       	return $name . $ext;
   
       }
       add_filter('sanitize_file_name', 'append_media_timestamp', 10);
       ```
   
 * **Question:** how do I auto select the following parameter:
 * Replace the file, use new file name and update all links

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Feature Request: Add Query String for Cache Busting’ is closed to new
replies.

 * ![](https://ps.w.org/enable-media-replace/assets/icon-256x256.png?rev=1940728)
 * [Enable Media Replace](https://wordpress.org/plugins/enable-media-replace/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enable-media-replace/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enable-media-replace/)
 * [Active Topics](https://wordpress.org/support/plugin/enable-media-replace/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enable-media-replace/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enable-media-replace/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [heyjoecampbell](https://wordpress.org/support/users/heyjoecampbell/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/feature-request-add-query-string-for-cache-busting/#post-11807844)
 * Status: resolved