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

UHF-7449 announcement cache warmer #485

Merged
merged 5 commits into from
Apr 4, 2023

Conversation

rpnykanen
Copy link
Contributor

@rpnykanen rpnykanen commented Apr 4, 2023

UHF-7449

Invalidate cache tags to clear global announcement block from varnish

What was done

Cache invalidation via cron.

How to install

  • Set Etusivu-instance up and running
  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-7449_announcement_cache_warmer
  • Run make drush-updb drush-cr

How to test

  • Add following line to local.settings.php (or change line 73 from prod to local on Announcements.php)
    • $config['helfi_global_announcement.settings']['source_environment'] = 'local'
  • Add new global announcement to etusivu
  • Check that you can see the external announcement in external site
  • Go and unpublish the external announcement
  • As anonymous user:
    • Go to a page with external announcements using url varnish-helfi-{instance}.docker.so/{the path to content}
      • You should still see the announcement
    • Run drush cron
    • Check the page again with varnish link
      • The announcement should have disappeared

@github-advanced-security
Copy link

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@sonarcloud
Copy link

sonarcloud bot commented Apr 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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