User tests: Successful: Unsuccessful:
Change getMediaVersion to use Infinity Cache instead of doing 1 useless DB query every time.
Reduce 1 db query for production installation, and 2 db query in debug mode.
Apply patch and make sure MediaVersion added to every script, and all works as before.
Go to "clear cache" page and remove _media_version
group, then check MediaVersion in to every script again, it should be new now.
None
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I don't think so that nowadays writing a cache file with our cache setup is faster than a db call. But I like the new possibility to regenerate the media version by clearing the cache.
having it cached instead in the database is much better, but what I think is that the thing is conceptional wrong isn't? I mean we still add the cms version to external libraries right?
we still add the cms version to external libraries right?
yes, and no, when WebAsset have a defined version, then it will be used instead of our MediaVersion.
Example this one (from media/vendor/joomla.asset.json):
{
"name": "awesomplete",
"type": "script",
"uri": "vendor/awesomplete/awesomplete.min.js",
"attributes": {
"defer": true
},
"package": "awesomplete",
"version": "1.1.5"
},
Will be as media/vendor/awesomplete/js/awesomplete.min.js?1.1.5
@HLeithner just to add to what @Fedik said about the static version number:
The only exceptions, that still use the media version string are:
version
The templates in order to use a file content hash based version need some adjustment in the com_templates file editing view (didn't do that with child templates as it was getting to complicated for the testing)
The sporadic files (mainly in the plugins IIRC) just need a joomla.asset.json file and adjusting the way they are imported.
I hope this clears things up
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-04-08 12:15:44 |
Closed_By | ⇒ | laoneo |
Thanks!
I have tested this item✅ successfully on 7a03b55
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37457.
FWIW https://invalidate-cache.dgrammatiko.dev v0.0.10 supports this 4.2 feature