-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add template cache #3755
Merged
Merged
Add template cache #3755
Conversation
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
due to createRelease.sh not catching an error from sed and continuing: sed: -e expression ether#1, char 66: unterminated `s' command
From now on, releases will be cut from develop, and merged directly into master. Each release will be a tag on the master branch (e.g. 1.7.0). A "release/1.7.0" branch will eventually be created only if/when a hotfix will be needed.
UPGRADE NOTES: if you have custom files in src/static/custom, save them somewhere else, revert the directory contents, update to Etherpad 1.7.5, and finally put them back in their new location, uder src/static/skins/no-skin.
The previous revision on master (d967914), that claimed to be 1.8.0, had a problem (see ether#3654), and so 1.8.0 was put on hold. In ether#3660 I decided to do a beta.1 release, in order to be able to catch similar problems. Closes ether#3658.
…d and file were reminified uselessly. By specification [0], the if-modified-since HTTP header sent by browsers does not include milliseconds. Before this patch, let's say a file was generate at time: t_real-file = 2020-03-22T02:15:53.548Z (note the fractional seconds) When issuing a conditional request, the browser would truncate the fractional part, and only request an if-modified-since with this contents: t_if-modified-since = 2020-03-22T02:15:53.000Z The minify() function would return HTTP/304 only if t_if-modified-since >= t_real-file, but this would never be true unless, by chance, a file was generated at XX.000Z. This resulted in that file being minified/compressed again and resent to the client for no reason. After this patch, the server correctly responds with HTTP/304 without doing any computation, and the browser uses the cached file. [0] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
Can you confirm this renders the read only pads with the expected content? IE it shouldn't show the stars for saved revision. |
Good for review/merge. @muxator |
b668097
to
e977102
Compare
e977102
to
b668097
Compare
We'll integrate this in 1.8.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It's a bit of a shame to use sync functions when we render template: https://github.com/ether/etherpad-lite/blob/develop/src/node/eejs/index.js#L106
I don't think we can change this function to be async, so I added a
readFile
cache and an EJS compilation cache. This is just a proposal because I'm not sure we expect that templates never change after an etherpad startup.See also #642