Score:0

How to automatically purge cache with nginx using the http-cache-purge module (ngx_http_cache_purge_module.so)

mx flag

I am running an Ubuntu 20.04 LEMP server with wordpress installed on it. I am using the nginx.org repository for nginx, but I compiled the cache-purge module (ngx_http_cache_purge_module.so) from source with my current nginx.org installation. However, I don't know how to automatically purge the cache using this module.

  1. Is this recompiled module now compatible with my nginx.org installation (i used --compat)

    if so

  2. How can I use this module to automatically purge my cache?

Score:0
us flag

You can install for example https://wordpress.org/plugins/nginx-helper/ plugin, which will interface with the nginx cache purge module.

DanRan avatar
mx flag
As noted in the original post, i already compiled and loaded that plugin into nginx. the question is how to activate it and make it work.
us flag
@DanRan I understood that you have installed the nginx cache purge module. In addition to that, you need to install WordPress plugin, which will then tell nginx cache purge module to purge caches.
DanRan avatar
mx flag
@TeroKilkanen My mistake I misunderstoond you! So to be clear, aside from loading the module, there is nothing else in nginx i have to do to activate cache purging with the plugin? No "on" directives or anything in nginx?
us flag
Actually that part depends on which exact module you compiled. https://github.com/FRiCKLE/ngx_cache_purge/ is one of the most popular ones. It requires configuration. Also the WordPress plugin tells what configuration you need.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.