You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love ClientDependency but i hate updating the config file to change the versioning number.
I hate it because it causes an app reboot. When used on big cached websites i cant cause a reboot only for versioning. I have tried adding a ?v=1 parameter to the RequiresCss path to css but it doesnt bundle.
Is there a way i could pass a value to override de versioning of the config?
Or more simple, how could i add a parameter to the final url?
The text was updated successfully, but these errors were encountered:
Hi, yes this has been asked/discussed on several occasions. You cannot 'just' append an arbitrary query string to the URL, this will not solve the problem.
The CDF version is both and client side and server side cache buster.
To solve this problem a cache buster provider needs to be implemented. I was not planning on updating this project to include new features such as this since there's a predecessor to this library that I made called Smidge which has all of this functionality but it's made for .Net Core.
If you wish to contribute to this project to help create this feature than you are more than welcome to and if/when it's complete a new CDF version can be released but to do this will be tricky because we can't have any breaking changes.
We'd create an interface for IVersionProvider which would return a version string. String is far more flexible than INT, but there might be some breaking change issues with this, we won't know until it's attempted to be built in which case it might be easier to make this return an INT.
If someone specifies a type for this new config property VersionProvider then we'd try to create it and resolve it to IVersionProvider. Then throughout the codebase, wherever the original Version property was used, we'd probably replace that will a function call like GetVersion() which would either return the value from the original Version value or from the result of IVersionProvider.
Then an implementation of IVersionProvider can be created.
Shazwazza
changed the title
Update versioning from razor without changing ClientDependency.config
Update versioning without changing ClientDependency.config
Feb 4, 2020
I love ClientDependency but i hate updating the config file to change the versioning number.
I hate it because it causes an app reboot. When used on big cached websites i cant cause a reboot only for versioning. I have tried adding a ?v=1 parameter to the RequiresCss path to css but it doesnt bundle.
Is there a way i could pass a value to override de versioning of the config?
Or more simple, how could i add a parameter to the final url?
The text was updated successfully, but these errors were encountered: