Skip to content

Commit

Permalink
Merge pull request #45 from dof-dss/state_cache
Browse files Browse the repository at this point in the history
Turn on state cache
  • Loading branch information
DuttonMa authored Sep 26, 2024
2 parents a6a725c + b0266ea commit bc67033
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/sites/site.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
'system.site',
];

/**
* State caching.
*
* State caching uses the cache collector pattern to cache all requested keys
* from the state API in a single cache entry, which can greatly reduce the
* amount of database queries. However, some sites may use state with a
* lot of dynamic keys which could result in a very large cache.
*/
$settings['state_cache'] = TRUE;

// Detect site id as $subsite_id from sites/site_id/settings.php.
if (!empty($subsite_id)) {
// Convert it to uppercase as that's our format for ENV vars
Expand Down

0 comments on commit bc67033

Please sign in to comment.