littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
629 stars 112 forks source link

Update a post not working due to cache policy used #123

Closed anorouzi closed 2 years ago

anorouzi commented 2 years ago

Hi, I have used slickstack as server for wordpress. it' cache policy works great but on the other hand it has some restrictions. Such as when updating a post or post a new article it won't be shown until clearing the cache through the admin panel. Is there any other way to automatically clear the cache for this and also not disabling the cache? Another example would be visitors counts on articles that would be the same until clearing the cache.

jessuppi commented 2 years ago

@anorouzi

This isn't really a bug report or feature request, you just need to adjust the FastCGI Cache settings in ss-config if you want to have more of a "micro-caching" type of environment vs. long term caching.

Specifically, these 2 settings are relevant:

FCGI_CACHE_VALID="1440m"
FCGI_CACHE_INACTIVE="1440m"

However in my opinion, this is already a decent value and I don't recommend invalidating the cache files too quickly, otherwise the benefit of having a page cache decreases (the performance is slower for some users arriving).

I think manually clearing the cache when needed is a better approach, unless you have a very busy news website. But keep in mind lowering these values will increase server load.