Currently assets are versioned within Oro by adding the ‘version’ GET argument onto the url:
For example on the demo site:
We are planning on using a web accelerator in front of our Oro instances as we wish to reduce load on the application servers. The web accelerator ideally would like to cache based on paths rather than GET arguments. So the asset path would become something like:
So the formats would be:
We are planning on using rewrite rules to make the ‘/assets/<version>/’ path virtual. So there will be no change to how Oro manages the files but there will need to be a change to how the assets are referenced when generating HTML and loading scripts.
The DynamicAssetVersionStrategyTest within the UIBundle seems to allude that this is possible by using a format similar to ‘%2$s/%1$s’. I understand there may be issues with how requirejs loads them due to the urlArgs callback within RequireJSBundle/Resources/views/scripts.html.twig.
Is this kind of versioning achievable? If not, is it something that could be added to the roadmap?
You must be logged in to reply to this topic.