Skip to content

Commit ba03764

Browse files
author
Dominic Rubas
committed
Make sure the surrogate keys for purging are unique and the list is not too long
1 parent 6fe9f64 commit ba03764

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pantheon-advanced-page-cache.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* @param array $keys Surrogate keys to purge.
1919
*/
2020
function pantheon_wp_clear_edge_keys( $keys ) {
21+
$keys = array_unique( $keys );
22+
$keys = \Pantheon_Advanced_Page_Cache\Emitter::filter_huge_surrogate_keys_list( $keys );
2123

2224
/**
2325
* Fires when purging specific surrogate keys.

0 commit comments

Comments
 (0)