Cache Duration, wordpress cache purge, docs

Hello everyone!

I have a few questions, so:

What exactly ‘Cache duration’ under a domain is (FastCGI), and how it works?

Is there any working plugin for wordpress that works without changing bunch of files on the server side, that would only require API credentials and per domain?
I found this one, but it doesn’t seem to work at all.
If anyone knows what to change inside, for it to work properly, can you drop changes here, and show us what needs to be done for it to work properly?

I find docs very confusing:

v-delete-fastcgi-cache

Disable FastCGI cache for nginx

Does it delete cache, or disables caching for a certain domain?

And there’s also v-purge-nginx-cache

Cache duration = Time (m/h/d) untill the page is cached again.

Is there any working plugin for wordpress that works without changing bunch of files on the server side, that would only require API credentials and per domain?
I found this one , but it doesn’t seem to work at all.

Last time I tested the plugin worked fine. Make sure your public ip is in the Server settings → Security → API white list

Disables the cache for that domain

Purge / deletes the cache (Or proxy cache if your are using Nginx as proxy)

Ok, done that. But I still can’t figure why it’s not working. All my pages after purging cache are still HIT.
I guess I should see a response in config/logs, just like when I purge cache manually from CP.
Tried with button on admin bar, it only goes blue, without any response.
Tried making new post, updating old post, nothing.

Is there some exotic settings where PHP and NGINX have to be same user?

Or maybe my default settings are not meant for it?

fastcgi_cache_path /var/cache/nginx/micro levels=1:2 keys_zone=microcache:10m max_size=1024m inactive=30m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

Thanks for the rest of the answers.

I assume you used a custom configuration?

If so delete delete them and use v-add-fastcgi-cache

Hestia create a custom path to allow multiple sites to run at the same time:

str="fastcgi_cache_path /var/cache/nginx/micro/$domain levels=1:2" 
str="$str keys_zone=$domain:10m max_size=512m inactive=30m;" 

See https://github.com/hestiacp/hestiacp/blob/9e26023634deb45afbacb2c1b4096d15b9ba49bd/bin/v-add-fastcgi-cache#L83-L92

1 Like

Well, I’ve copied that part from nginx.conf
Since I have two folders inside /var/cache/nginx/micro for both of my domains, i guess it’s properly configured, except the part max size, which is custom.

looking at fastcgi_cache_pool.conf everything looks as it should

fastcgi_cache_path /var/cache/nginx/micro/domain1.com levels=1:2 keys_zone=domain1.com:10m max_size=512m inactive=30m;
fastcgi_cache_path /var/cache/nginx/micro/domain2.net levels=1:2 keys_zone=domain2.net:10m max_size=512m inactive=30m;

Check /home/$user/conf/web/$domain/nginx.fastcgi_cache.conf

It should be configured then.

v-purge-fastcgi-cache should delete /var/cache/nginx/micro/domain/

Yes, it is configured.

    fastcgi_cache domain1.net;
    fastcgi_cache_valid 200 1440m;
    fastcgi_cache_valid 301 302 10m;
    fastcgi_cache_valid 404 10m;
    fastcgi_cache_bypass $no_cache;
    fastcgi_no_cache $no_cache;
    set $no_cache 0;

Manually typing this in terminal deletes cache without issues.

This should be fine.

I know their is a bug in the software that always return HIT if I am right…

Just add an php code that print the current time / date to see if it is working…

I guess I would see front page refresh when I publish a new post, just like when I use purge button from CP. But it doesn’t happen for some reason.

Maybe I’ve messed up something when entering data on configuration page, because I’ve misunderstand what needs to be the input.

Host - subdomain.domain.tld where my Hestia panel is (without https://) ?
port - 8083 if I use that one for HestiaCP
API key - that was the most documented part, and it’s the only part I’m 100% sure it’s correct :slight_smile:
Hestia user - obviously user that’s having that domain under his name in HestiaCP

Are those correct?

Should be fine

What is in Hestia → “Cogs” Server → Configure Server → Secrurity

It should include both 127.0.0.1 and your public ip

1 Like

ooooooooh, that’s it 127.0.0.1 was missing, when I’ve added it, it works.

THANK YOU!!!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.