How to clear cache of a json file in my Godaddy WordPress website automatically when I update it

So I have a website hosted on Godaddy, where I have a “sellers.json” file, the file updates once in a while using a php script I created to update the phpmyadmin database, all of the CRUD operations work as they should, however, the issue we encounter is that on every database update I have to manually go into /wp-admin and click flush cache.

As a developer, I wanted to create a function that will automaticly flush the cache upon every create/edit/delete, I have came across this function “WP_Object_Cache::flush()”, and tried to use it but it didn’t work for me due to an error.
Is that the function and method that I need? or is there an easier method? Thanks!