Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bust cache when changing spaces #17040

Merged

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Mar 28, 2022

What type of PR is this? (check all applicable)

  • Feature

Description

In the app/views/layouts/application.html.erb we use
ApplicationHelper#release_adjusted_cache_key to define a cache
key. That cache key includes the
Settings::General.admin_action_taken_at time field.

The ApplicationController#bust_content_change_caches method is
responsible for updating the Settings::General.admin_action_taken_at column.

Related Tickets & Documents

This relates to #16606 and may be necessary for the
following:

QA Instructions, Screenshots, Recordings

For this to be meaningfully tested, you'll need to spin up community.benhalpernc.com.

UI accessibility concerns?

None.

Added/updated tests?

  • No, and this is why: I'm waiting on the finalization of the UI behavior
    for the /admin/content_manager/spaces before writing a more robust
    spec.

[Forem core team only] How will this change be communicated?

  • I will share this change internally with the appropriate teams

In the [app/views/layouts/application.html.erb][1] we use
[ApplicationHelper#release_adjusted_cache_key][2] to define a cache
key.  That cache key includes the
`Settings::General.admin_action_taken_at` time field.

The [ApplicationController#bust_content_change_caches][3] method is
responsible for updating the `Settings::General.admin_action_taken_at` column.

[1]:https://github.com/forem/forem/blob/f5ae2900b5a91d16dac98b9429384c39386163fa/app/views/layouts/application.html.erb#L48
[2]:https://github.com/forem/forem/blob/f5ae2900b5a91d16dac98b9429384c39386163fa/app/helpers/application_helper.rb#L193-L198
[3]:https://github.com/forem/forem/blob/f5ae2900b5a91d16dac98b9429384c39386163fa/app/controllers/application_controller.rb#L255-L258

This relates to #16606 and may be necessary for the
following:

- #16783
- #16836
- #16837
- #16965
- #17008
@jeremyf jeremyf requested a review from a team March 28, 2022 23:53
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Mar 28, 2022
@jeremyf jeremyf requested a review from Ridhwana March 28, 2022 23:53
@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Mar 29, 2022
@jeremyf jeremyf merged commit 6049271 into main Mar 29, 2022
@jeremyf jeremyf deleted the jeremyf/ensure-toggling-space-updates-admin-action-taken branch March 29, 2022 15:09
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants