This file contains hidden or 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
| <?php | |
| namespace Drupal\Core\Cache; | |
| use Drupal\Component\Assertion\Inspector; | |
| /** | |
| * Stores cache items in /dev/shm. | |
| */ | |
| class ShmBackend implements CacheBackendInterface { |
This file contains hidden or 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
| diff --git a/web/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php b/web/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php | |
| --- a/web/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php | |
| +++ b/web/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php | |
| @@ -46,6 +46,9 @@ public function __construct($root, $site_path, CacheTagsChecksumInterface $check | |
| else { | |
| $this->backendClass = 'Drupal\Core\Cache\Apcu4Backend'; | |
| } | |
| + | |
| + $this->backendClass = 'Drupal\Core\Cache\CFAwareApcuBackend'; | |
| + //$this->backendClass = 'Drupal\Core\Cache\ShmBackend'; |
This file contains hidden or 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
| <?php | |
| namespace Drupal\Core\Cache; | |
| use Drupal\Component\Assertion\Inspector; | |
| /** | |
| * Stores cache items in the Alternative PHP Cache User Cache (APCu). | |
| */ | |
| class CFAwareApcuBackend extends ApcuBackend { |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <pthread.h> | |
| #ifdef _MSC_VER | |
| #include <intrin.h> /* for rdtscp and clflush */ | |
| #pragma optimize("gt",on) | |
| #else | |
| #include <x86intrin.h> /* for rdtscp and clflush */ |
This file contains hidden or 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
| <?php | |
| function yac_store() { | |
| static $yac; | |
| if (!isset($yac)) { | |
| $yac = new Yac(''); | |
| } | |
| return $yac; |
This file contains hidden or 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
| <?php | |
| /** | |
| * @file | |
| * | |
| * Contains Drupal\newsletter_view\Controller\NewsletterViewNodeController | |
| */ | |
| namespace Drupal\newsletter_view\Controller; |
This file contains hidden or 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
| <?php | |
| function foo() {} | |
| function bar() {} | |
| function crash_merge($attached) { | |
| $merge = [ 'html_head' => ['2']]; | |
| $attached = array_merge_recursive( |
This file contains hidden or 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
| diff --git a/core/modules/big_pipe/big_pipe.module b/core/modules/big_pipe/big_pipe.module | |
| index 724cd1c..f1af3a4 100644 | |
| --- a/core/modules/big_pipe/big_pipe.module | |
| +++ b/core/modules/big_pipe/big_pipe.module | |
| @@ -18,8 +18,16 @@ | |
| function big_pipe_js_settings_alter(&$settings) { | |
| // Store the settings for later usage. | |
| if (isset($settings['bigPipeResponseMarker'])) { | |
| - \Drupal::service('big_pipe')->setAjaxPageState(isset($settings['ajaxPageState']) ? $settings['ajaxPageState'] : NULL); | |
| + $ajax_page_state = isset($settings['ajaxPageState']) ? $settings['ajaxPageState'] : NULL; |
This file contains hidden or 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
| <?php | |
| // ... | |
| if (!empty($half_pipe_placeholders)) { | |
| $extra_attachments = $this->doHalfPipe($page_parts[0], $half_pipe_placeholders); | |
| // Print the extra attachments. | |
| if (!empty($extra_attachments['library']) || !empty($extra_attachments['drupalSettings'])) { | |
| $all_attachments = BubbleableMetadata::mergeAttachments($attachments, $extra_attachments); |