We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e69ef03 + fb6c1fc commit 04c2598Copy full SHA for 04c2598
src/admin/class-admin.php
@@ -524,6 +524,11 @@ public static function flush_cache_for_specific_endpoints( $post_id = null ) {
524
* @return void
525
*/
526
public static function flush_openkaarten_datasets_cache() {
527
+ // Check if the post is saved or updated.
528
+ if ( ! is_plugin_active( 'wp-rest-cache/wp-rest-cache.php' ) ) {
529
+ return;
530
+ }
531
+
532
Caching::get_instance()->delete_cache_by_endpoint( '%/owc/openkaarten/v1/datasets', Caching::FLUSH_LOOSE, true );
533
}
534
0 commit comments