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

Add support for page cache #15

Merged
merged 1 commit into from
Jul 21, 2020
Merged

Add support for page cache #15

merged 1 commit into from
Jul 21, 2020

Conversation

bogdanpetrea
Copy link
Contributor

No description provided.

@bogdanpetrea bogdanpetrea force-pushed the page-cache-redis branch 5 times, most recently from 96e316c to d0831c9 Compare June 17, 2020 12:12
@bogdanpetrea bogdanpetrea force-pushed the page-cache-redis branch 3 times, most recently from bd19bf6 to 429c0ec Compare June 23, 2020 13:05
php/docker/templates/nginx-vhost-conf.d/80-index.conf Outdated Show resolved Hide resolved
}

# Don't cache uris containing the following segments
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work for multisites, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be tested in that scenario to know for sure.

php/docker/templates/nginx-vhost-conf.d/80-index.conf Outdated Show resolved Hide resolved
@bogdanpetrea bogdanpetrea force-pushed the page-cache-redis branch 2 times, most recently from e570753 to e69c116 Compare June 24, 2020 12:53
@bogdanpetrea bogdanpetrea changed the title Add support for page cache using Redis Add support for page cache Jun 25, 2020

redis2_query set $key $echo_request_body;
redis2_query expire $key $exptime;
redis2_pass {{ default "localhost:6379" .Env.STACK_PAGE_CACHE_REDIS_HOST_PATH }};
Copy link
Contributor

@AMecea AMecea Jul 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
redis2_pass {{ default "localhost:6379" .Env.STACK_PAGE_CACHE_REDIS_HOST_PATH }};
redis2_pass {{ default "localhost" .Env.STACK_PAGE_CACHE_REDIS_HOST }}:{{ default "6379" .Env.STACK_PAGE_CACHE_REDIS_PORT }};

And add Redis password:

   {{ with .Env.STACK_PAGE_CACHE_REDIS_PASSWORD }}
   redis2_query auth {{ . }}
   {{- end }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can work on this in a later PR, since it's not so straightforward. See:
openresty/srcache-nginx-module#60
openresty/srcache-nginx-module#41

@AMecea AMecea merged commit b8a4171 into master Jul 21, 2020
@delete-merged-branch delete-merged-branch bot deleted the page-cache-redis branch July 21, 2020 10:41
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.

3 participants