-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Enable resource caching per context to fix context aware expressions #3844
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8da0be4
Enable caching on per context basis to fix context aware expressions.
petschki d87467f
changenote
petschki d9d3e48
fix saving renderer in request cache
petschki 63dc57c
fix updating mtime when changing RR entry.
petschki 908cd23
Merge branch '6.0.x' into petschki-issue-3789
MrTango 5ff8c19
sorted list for static cachekey
petschki 40de8e6
Merge branch '6.0.x' into petschki-issue-3789
jensens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Generate resource cachekey on per context basis to fix | ||
context aware expressions. | ||
[petschki] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this actually needed? It seems to me that the previous hardcoded
_WEBRESOURCE_CACHE_
key is fine for using on the request: the request is always for one context.In fact, with this PR the cache on the request is not actually used. I have added some debugging code:
When I visit a document, the output is for example:
This is when generating contents of the Script and Styles viewlets. (The contents will still come from the volatile attribute on the site root, once set, but that is not the point here.)
When I use
REQUEST_CACHE_KEY = "_WEBRESOURCE_CACHE_"
, the output becomes as follows, showing that the request cache is working:Alternatively, I suppose the part of
update
method that buildsself.renderer
could be changed so that it only handles javascript whenself.resource_type
isjs
, and only styles whenself.resource_type
iscss
. But that may be too big a change.Just using the old static request cache key should be fine.