Title: Request: filter for version string?
Last modified: September 28, 2023

---

# Request: filter for version string?

 *  Resolved [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/request-filter-for-version-string/)
 * Would you consider adding a filter call for the generation of the randomization
   string? Something like this:
 * includes/class-super-light-cache-buster.php:   ~line 525
 * $random_number = apply_filters( ‘slcb_version_string’, wp_rand( 1000, 520000000));
 * We want to use this when we make a css change that browsers have a hard time 
   letting go of, but we don’t want to totally disable caching. Hooking that filter
   would allow us to return a fixed string so it would reset older cached items 
   but allow forward going caching to work until we changed the string again. This
   seems to be working in my testing, although I have only done a small amount so
   far.

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

 *  Thread Starter [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/request-filter-for-version-string/#post-17084386)
 * Or, instead of random, if you decided to add the option to use a fixed string
   instead and have an option in settings to set that string… That would work as
   well. 🙂
 *  Plugin Author [Mwale Kalenga](https://wordpress.org/support/users/mwalek/)
 * (@mwalek)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/request-filter-for-version-string/#post-17114076)
 * Hey [@scmsteve](https://wordpress.org/support/users/scmsteve/),
 * Thanks so much for the great suggestions!
 * I think this feature would be useful to many other users, so I should implement
   it in the very near future. 🙂
 * Will update you here when the new release is available.
 * If the plugin is already useful for you, please also consider leaving a review.
   Thank you!
 * Kind regards,
   Mwale
 *  Plugin Author [Mwale Kalenga](https://wordpress.org/support/users/mwalek/)
 * (@mwalek)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/request-filter-for-version-string/#post-17129835)
 * Hey [@scmsteve](https://wordpress.org/support/users/scmsteve/),
 * I released v1.4.0 today which has the requested changes, both of them. 🙂
 * There is an option to change the version number on the settings page, but you
   can override that setting programmatically using the filter `slcb_version_name`
   if you like.
 * ![](https://i0.wp.com/i.ibb.co/Np8F8G7/Screenshot-2023-10-17-at-1-59-46-PM.png?
   ssl=1)
 * When using the filter, simply return the desired asset version name (or number).
 * Please have a look and let me know if the changes meet your needs. Thanks!
 * Kind regards,
   Mwale
 *  Thread Starter [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/request-filter-for-version-string/#post-17130388)
 * This is excellent work! Thank you so much! Now we could have a fixed string that
   can be updated by any site admin when they want to “reset” the caching or have
   it programmatically controlled so some external condition could change it. This
   adds an incredible amount of flexibility for us. Thank you for implementing it!
 *  Plugin Author [Mwale Kalenga](https://wordpress.org/support/users/mwalek/)
 * (@mwalek)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/request-filter-for-version-string/#post-17131934)
 * Hey [@scmsteve](https://wordpress.org/support/users/scmsteve/),
 * Amazing, thanks a lot for confirming that the changes are what you needed!
 * If you notice any issues or have any other requests, please do reach out again.
 * And if you are happy with the plugin, please also consider leaving a positive
   rating. That would be highly appreciated!
 * Take care!
 * Kind regards,
   Mwale

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

The topic ‘Request: filter for version string?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/super-light-cache-buster.svg)
 * [Super Light Cache Buster](https://wordpress.org/plugins/super-light-cache-buster/)
 * [Support Threads](https://wordpress.org/support/plugin/super-light-cache-buster/)
 * [Active Topics](https://wordpress.org/support/plugin/super-light-cache-buster/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/super-light-cache-buster/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Mwale Kalenga](https://wordpress.org/support/users/mwalek/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/request-filter-for-version-string/#post-17131934)
 * Status: resolved