Issue with caching
I'm currently experiencing an issue where I create a new category/subcategory and it doesn't show for all users (with privileges set to allow everyone to view/read).
I'm running NodeBB on two server instances (on Azure). It seems that the server which is used to create the new category shows on the frontend. The other server instance, however, doesn't show the new category.
I've checked the category API, in the server that was used to create the category it appears in the JSON, but it doesn't appear in the API on the other server instance.
The two servers only share 1 database, so the category data must be there. How long does it take for the cache to refresh?
The cache stays as long as it is not full and it is not invalidated. Sounds like you need to setup pubsub so changes you make on one server are propagated to the others.
@danlong Please consult this section of the documentation for more info re: pubsub: https://docs.nodebb.org/configuring/scaling/#configure-redis
I've added a flag in my config.json
Is that enough to make the pubsub work with postgres or do I need to add an additional redis server and the config block?
That should be enough I think. You can also add
singleHostCluster: trueIf all your nodebb processes are on a single server.
Thank you both, this resolved the issue