FIX Do not cache current site config #165
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue silverstripe/.github#272
When running behat on siteconfig from a recipe-kitchen-sink context only, the following behat tests will fail
The fail because $this->CanEditType in SiteConfig::canEditPages() will incorrectly by 'LoggedInUsers' instead of 'OnlyTheseUsers' - not this is NOT run-over from another behat tests, it happens when the tests are run individually
Beucase SiteConfig::current_site_config() is used at some point, and it will use a cached version of SiteConfig::get_one(), which is getting set at some point in recipe-kitchen-sink (I wasn't able to work out exactly where) which it normally isn't during installer.
I've had a look to see if SiteConfig::current_site_config() is being used in loops anywhere and it isn't, so the performance loss on not using the cache should be basically irrelevant