Skip to content

Commit 0f6a65d

Browse files
committed
Make all object cache flushing optional
1 parent 9807001 commit 0f6a65d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ui/admin/settings-settings.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
$api->load_pods( array( 'bypass_cache' => true ) );
5151
}
5252

53-
pods_redirect( pods_query_arg( array( 'pods_cache_flushed' => 1 ), array( 'page', 'tab' ) ) );
53+
pods_redirect( pods_query_arg( array( 'pods_cache_flushed' => 1, 'pods_cache_flush_objects' => (int) pods_v( 'pods_cache_flush_objects', 'post' ) ), array( 'page', 'tab' ) ) );
5454
} else {
5555
// Handle saving settings.
5656
$action = __( 'saved', 'pods' );
@@ -122,6 +122,11 @@
122122

123123
<p class="submit">
124124
<input type="submit" class="button button-secondary" name="pods_cache_flush" value="<?php esc_attr_e( 'Clear Pods Cache', 'pods' ); ?>" />
125+
&nbsp;&nbsp;&nbsp;
126+
<label>
127+
<input type="checkbox" name="pods_cache_flush_objects" value="1"<?php checked( pods_v( 'pods_cache_flush_objects', 'get', 1 ) ); ?> />
128+
<?php esc_html_e( 'Also flush all WordPress object caches', 'pods' ); ?>
129+
</label>
125130
</p>
126131

127132
<hr />

0 commit comments

Comments
 (0)