-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove base url from global cache prefix #8716
Conversation
This still gives the full deps in my env and doesn't clear them properly. :/ Let me check the prefixes on CLI and web. |
I needed to configure Having this set up the first request to that URL still results in a 404 and the followup requests show the proper file. :/ Still weird. |
The weird thing: the file is properly rendered, but somewhere later a 404 is triggered:
|
404 page is rendered here: server/core/Controller/JsController.php Line 74 in 4ef302c
|
Codecov Report
@@ Coverage Diff @@
## master #8716 +/- ##
============================================
- Coverage 31.43% 6.72% -24.72%
Complexity 25368 25368
============================================
Files 1607 1607
Lines 95157 95153 -4
Branches 1379 1379
============================================
- Hits 29917 6399 -23518
- Misses 65240 88754 +23514
|
Not that weird ... this code is called before the "isCached" is called and thus fails to fetch it. Maybe there is another position where we should check for the file first. |
@juliushaertl Still the same behavior with the most recent commit. |
Okay - so the files are regenerated on the processing of the 404 template and not on the call to This happens first: As this is a direct access to the "to be cached" location it fails and causes a 404 page to be rendered which properly fetches the asset through the JSCombiner (and not directly): |
@juliushaertl I tested this by calling |
Yes, the template needs to be loaded first, since that will iterate over included js/scss files and then run the combiner/scss cacher. |
It would of course make sense to trigger that also for direct requests to the getJS route. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works if I open run the repair step and call http://localhost:8000/apps/files/
- it does not work if I open http://localhost:8000/js/core/merged-template-prepend.js
directly. Fine for me for now.
Let's do this in a followup PR. |
Ok great. Let me adjust the tests then. |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
7ef1012
to
573b940
Compare
Done. Failing tests are unrelated. |
Indeed - composer failure :/ |
backport at #8745 |
Having the base url in the global cache prefix seems to have caused the various issues with the SCSSCacher/JSCombiner. The cache was not cleared properly when using multiple domains and for cases when the base url was fetched while running form the cli.
This PR moves the base url from the global prefix to the cache prefix itself, so when calling the clear method of any ICache, all entries will properly get removed.
It will also reduce the number of used cache keys, since we don't have duplicate keys for every base url now anymore.
Fix for #8705 - I think we should merge it in addition to #8714 since this will fix the root cause, that the cache was not cleared properly.