Hi @brnteka
Thank you for using our plugin!
You are actually asking two different things (flushing and regenerating), so I am going to answer them seperately.
Yes it is possible to flush all caches of a specific post type programmatically. For instance if you would like to flush all caches of a post type products you can do so like this:
\WP_Rest_Cache_Plugin\Includes\Caching\Caching::get_instance()->delete_object_type_caches( 'products' );
But I must say: why would that be needed? If you update the post using WordPress core function the caches should be flushed automatically. Isn’t this the case in your situation? Or are you updating the posts with a direct database query?
About regenerating: we don’t have the option to regenerate specific post type caches, but we do have the option to automatically regenerate flushed (or expired) caches. See our FAQ on how to set this up.
But I must say: why would that be needed? If you update the post using WordPress core function the caches should be flushed automatically. Isn’t this the case in your situation? Or are you updating the posts with a direct database query?
I’m using Carbon Fields so this might be the case, but i call wp_update_post function as well, and fields updated with CF API doesn’t seems to be flushed.
About regenerating: we don’t have the option to regenerate specific post type caches, but we do have the option to automatically regenerate flushed (or expired) caches. See our FAQ on how to set this up.
If selected “once a day” what time it would be exactly? Would be great if i could set the time to be somewhere near after the end of a cron job.
Thank you for the quick response