Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Site/Settings.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
154 * | 154 * |
155 * A standardized prefix is useful to allow visual inspection of an APCu user | 155 * A standardized prefix is useful to allow visual inspection of an APCu user |
156 * cache. By default, this method will produce a unique prefix per site using | 156 * cache. By default, this method will produce a unique prefix per site using |
157 * the hash salt. If the setting 'apcu_ensure_unique_prefix' is set to FALSE | 157 * the hash salt. If the setting 'apcu_ensure_unique_prefix' is set to FALSE |
158 * then if the caller does not provide a $site_path only the Drupal root will | 158 * then if the caller does not provide a $site_path only the Drupal root will |
159 * be used. This allows WebTestBase to use the same prefix ensuring that the | 159 * be used. This allows tests to use the same prefix ensuring that the number |
160 * number of APCu items created during a full test run is kept to a minimum. | 160 * of APCu items created during a full test run is kept to a minimum. |
161 * Additionally, if a multi site implementation does not use site specific | 161 * Additionally, if a multi site implementation does not use site specific |
162 * module directories setting apcu_ensure_unique_prefix would allow the sites | 162 * module directories setting apcu_ensure_unique_prefix would allow the sites |
163 * to share APCu cache items. | 163 * to share APCu cache items. |
164 * | 164 * |
165 * @param $identifier | 165 * @param $identifier |
166 * An identifier for the prefix. For example, 'class_loader' or | 166 * An identifier for the prefix. For example, 'class_loader' or |
167 * 'cache_backend'. | 167 * 'cache_backend'. |
168 * | 168 * |
169 * @return string | 169 * @return string |
170 * The prefix for APCu user cache keys. | 170 * The prefix for APCu user cache keys. |
171 * | |
172 * @see https://www.drupal.org/project/drupal/issues/2926309 | |
171 */ | 173 */ |
172 public static function getApcuPrefix($identifier, $root, $site_path = '') { | 174 public static function getApcuPrefix($identifier, $root, $site_path = '') { |
173 if (static::get('apcu_ensure_unique_prefix', TRUE)) { | 175 if (static::get('apcu_ensure_unique_prefix', TRUE)) { |
174 return 'drupal.' . $identifier . '.' . \Drupal::VERSION . '.' . static::get('deployment_identifier') . '.' . hash_hmac('sha256', $identifier, static::get('hash_salt') . '.' . $root . '/' . $site_path); | 176 return 'drupal.' . $identifier . '.' . \Drupal::VERSION . '.' . static::get('deployment_identifier') . '.' . hash_hmac('sha256', $identifier, static::get('hash_salt') . '.' . $root . '/' . $site_path); |
175 } | 177 } |