We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6987a2b + fb6c1fc commit 85cfc20Copy full SHA for 85cfc20
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