Skip to content

Add flush groups cache button to admin settings#219

Merged
rvanoord merged 2 commits intomasterfrom
copilot/retrieve-groups-and-flush-cache
Apr 15, 2026
Merged

Add flush groups cache button to admin settings#219
rvanoord merged 2 commits intomasterfrom
copilot/retrieve-groups-and-flush-cache

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Group list changes (e.g. after updating group tags) aren't reflected in the admin because coreapi_groups and coreapi_all_groups transients are cached for 24 hours. The on_site_groups_option_update hook only fires when the options themselves change, not when upstream group data changes.

Changes

  • New "Flush Groups Cache" button on the BCC Login settings page, rendered between the settings form and the existing Maintenance section
  • Only visible when groups are enabled — reuses the same $use_groups_settings condition that gates the Groups settings section
  • Handler deletes coreapi_groups and coreapi_all_groups transients with nonce verification and manage_options capability check
  • Stores $_use_groups_settings as an instance property on BCC_Login_Settings_Provider so the render method can access it

@rvanoord rvanoord marked this pull request as ready for review April 15, 2026 09:17
@rvanoord rvanoord merged commit c9b2de5 into master Apr 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants