Skip to content
Snippets Groups Projects
Commit 3864ef40 authored by Pooja Sharma's avatar Pooja Sharma Committed by Stephen Mustgrave
Browse files

Resolve #3470776 "Fixing caching issue of tour config form "

parent 604d1b25
No related branches found
No related tags found
1 merge request!54Resolve #3470776 "Fixing caching issue of tour config form "
Pipeline #267450 passed
......@@ -2,6 +2,7 @@
namespace Drupal\tour\Form;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
......@@ -72,6 +73,7 @@ class TourSettingsForm extends ConfigFormBase {
->set('tour_avail_text', $form_state->getValue('tour_avail_text'))
->set('tour_no_avail_text', $form_state->getValue('tour_no_avail_text'))
->save();
Cache::invalidateTags(['tour_settings']);
}
}
......@@ -58,6 +58,7 @@ final class LazyBuilders implements TrustedCallbackInterface {
'#tag' => 'button',
'#cache' => [
'context' => ['contexts' => ['url']],
'tags' => ['tour_settings'],
],
'#value' => $noTips ? $tour_no_avail_text : $tour_avail_text,
'#attributes' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment