-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
D8/D9 - Configurable tag overriding (#30)
* adding placeholder for readme update * adding override setting * override fixing * test * update function * install config * readme * better readme * Update src/EventSubscriber/CacheableResponseSubscriber.php Co-authored-by: Clay Freeman <[email protected]> * Update src/EventSubscriber/CacheableResponseSubscriber.php Co-authored-by: Clay Freeman <[email protected]> * Update src/EventSubscriber/CacheableResponseSubscriber.php Co-authored-by: Clay Freeman <[email protected]> * Update README.md Co-authored-by: Clay Freeman <[email protected]> * Update src/EventSubscriber/CacheableResponseSubscriber.php Co-authored-by: Clay Freeman <[email protected]> * Update src/EventSubscriber/CacheableResponseSubscriber.php Co-authored-by: Clay Freeman <[email protected]> * Update src/EventSubscriber/CacheableResponseSubscriber.php Co-authored-by: Clay Freeman <[email protected]> * codesniff fix Co-authored-by: Clay Freeman <[email protected]>
- Loading branch information
1 parent
4f0808d
commit 9f0dfca
Showing
6 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
override_list_tags: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Update functions for the Pantheon Advanced Page Cache module. | ||
*/ | ||
|
||
/** | ||
* Set override_list_tags to TRUE for backwards compatibility. We recommend manually changing to FALSE for more consistent clearing. See README | ||
*/ | ||
function pantheon_advanced_page_cache_update_8001() { | ||
\Drupal::configFactory()->getEditable('pantheon_advanced_page_cache.settings')->set('override_list_tags', TRUE)->save(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Feature: Listing tags | ||
In order to control caching of lists | ||
As an administrator | ||
I want to toggle the setting for overriding cache tags | ||
|
||
@api | ||
Scenario: Core behavior | ||
Given there are some "article" nodes | ||
And "/" is caching | ||
When a generate a "article" node | ||
Then "/" has been purged | ||
And "/" is caching | ||
|
||
@api @current | ||
Scenario: Old override | ||
Given there are some "article" nodes | ||
When I run drush "config:set pantheon_advanced_page_cache.settings --input-format=yaml override_list_tags true" | ||
And "/" is caching | ||
When a generate a "article" node | ||
And "/" has not been purged | ||
|