easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

✨️ Add cache update feature

Open kirtangajjar opened this issue 3 years ago • 2 comments

Depends on: EasyEngine/site-command#387 EasyEngine/site-type-php#87 EasyEngine/site-type-wp#194 fixes https://github.com/EasyEngine/feature-requests/issues/92

kirtangajjar avatar Jul 14 '21 13:07 kirtangajjar

@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

dhsathiya avatar Aug 09 '21 03:08 dhsathiya

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.

bklim5 avatar May 08 '23 16:05 bklim5