Skip to content
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

Cache post page upon getting published and Preload URLs on shutdown hook #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arafatkn
Copy link
Contributor

@arafatkn arafatkn commented Apr 8, 2022

Added a new filter named rt_nginx_helper_preload_urls which contains an array of URLs. Those URLs will be preloaded through the shutdown hook.

Get the current updated post from the transition_post_status hook and check whether the post status is published from a non-published status. Then the URL of the post will be added to the rt_nginx_helper_preload_urls filter so that the URL can be preloaded.

With the above process, a new post will be cached as soon as they got published. Also, the rt_nginx_helper_preload_urls filter can also be used to preload other URLs if needed in the future.

@arafatkn arafatkn self-assigned this Apr 8, 2022
@arafatkn arafatkn linked an issue Apr 8, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache new posts as soon as they get published
1 participant