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 cache update feature #1550

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

kirtangajjar
Copy link
Contributor

@kirtangajjar kirtangajjar commented Jul 14, 2021

@@ -7,7 +7,7 @@
/**
* Base EE Model class.
*/
abstract class Base {
abstract class Base extends \ArrayObject {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was needed for site type PHP and wp where some existing methods were called. Those methods were called in site create too where they use array index to access properties. In site update, we use object property accessor to get the values.

@dhsathiya
Copy link
Member

dhsathiya commented Aug 9, 2021

@kirtangajjar Another approach can be to set the skip variable in a different file.
Include the file in main.conf.
To turn it on/off just replace the skip value to 1.

The only thing it won't do is, turn off/on X-SRCache-Fetch-Status and X-SRCache-Store-Status headers instead of just changing their values.

To me, that will not create any issue as the value on skip cache will be BYPASS on both headers.


Implementation

  1. /opt/easyengine/sites/example.com/config/nginx/conf.d/main.conf
        # Redis NGINX CONFIGURATION
        # set $skip 0;
        include /usr/local/openresty/nginx/conf/conf.d/redis.conf;
  1. /opt/easyengine/sites/example.com/config/nginx/conf.d/redis.conf
set $skip 0;  # or 1 to BYPASS

now you just have to change redis.conf.


Update:

We can put headers in a separate file. Then when not required we can make the file empty in order to disable the headers.
We can also add cache-related conditions to redis.conf

cc: @mrrobot47

@bklim5
Copy link

bklim5 commented May 8, 2023

hi checking if this is still actively being developed or maintained? We also have a recent use case to enable --cache from the update command.

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.

Site update cache on/off
4 participants