After couple of nights of searching and trying various approaches, I haven't found any solution.
Cache not clearing after saving manually post meta.
I'm creating a tool for admins, which will update custom post type's meta data (ACF-fields) with command
Changes are being saved to the database and changes can be seen when editing the post. The changes can be seen when in backend.
On the frontend new saved meta data can't be seen, but there's old values that doesn't exist in the database anymore. So the values are not fetched from the database, but from cache. If I update the post in the edit post view, then the new values will show on frontend. But instructing users to go editing post and save it after using this mentioned tool, is not good practice.
So what is the right way to flush Wordpress's cache?
What have been tried
This is what I have already tried:
update_field() I've run:
wp_cache_delete() clean_post_cache() update_post_caches() wp_cache_flush() $wpdb->flush()
These functions didn't empty the cache. Am I perhaps using them wrong?
I'm doing the developing in Local by Flywheel, which is using Nginx. I suspected about Nginx and switched to Apache, but that didn't help. So Nginx isn't causing the issue.
Forgot to mention earlier, that no Cache plugins is being used.