Transient Caching. Minor Privacy Enhancement#14
Open
greg-randall wants to merge 2 commits intoProgressPlanner:mainfrom
Open
Transient Caching. Minor Privacy Enhancement#14greg-randall wants to merge 2 commits intoProgressPlanner:mainfrom
greg-randall wants to merge 2 commits intoProgressPlanner:mainfrom
Conversation
- Add transient caching to ContentRenderer to reduce CPU load on high-traffic sites - Implement post-modified validation to ensure cache freshness - Hide alternate link discovery tags for password-protected content to improve privacy - Add 'markdown_alternate_cache_expiration' filter for developer control - Bump version to 1.1.0
- Add spaces inside parentheses for function calls and control structures - Use array() syntax for transient data to match WP standards - Add DocBlock documentation for 'markdown_alternate_cache_expiration' filter - Reorder comparison in cache validation for better readability
Member
|
Consolidation note: overlaps with #11 in ContentRenderer. Recommend choosing a primary renderer PR and rebasing the other after merge. |
This file contains hidden or 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
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.
Context
I added transient caching for markdown output and hid the alternate link tag for password-protected posts.
<link rel="alternate">tag in the HTML head, which reveals that a markdown endpoint exists for gated content.Summary
This PR can be summarized in the following changelog entry:
<link rel="alternate">tag in the HTML head for password-protected posts.markdown_alternate_cache_expirationfilter for adjusting cache duration.Relevant technical choices:
post_modifiedrather than relying only on time-based expiry, so post edits show up without waiting for the cache to expire.post_password_required()for the visibility check because it respects the cookie-based password flow- it returns false if the user has already entered the password.Test instructions
.mdURL and reload; second request should be served from cache..mdURL, content should update.<link rel="alternate">tag is gone from the HTML source. Remove the password and confirm it reappears.Relevant test scenarios
UI changes
Documentation
Quality assurance
Fixes #