Open dkwiebe opened 4 years ago
BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly.
Please keep in mind that:
Thank you!
-- Justin Case The Backpack Robot
Thank you for the PR @dkwiebe ! I agree - I see no reason why we shouldn't cache the settings, and prevent all those queries on page load.
One thing popped up when looking over your PR (metioned it here too https://github.com/Laravel-Backpack/Settings/issues/90#issuecomment-565978500): I think we also need to refresh the cache when a Setting is edited, so that the new value is instantly available. Otherwise I think the Admin will go edit a setting, see the new value in the admin panel, but not understand why that new value is not used on his website. Right?
Waiting this feature in new version!
Add support to SettingsServiceProvider.php to cache settings using the Laravel cache. This slightly improves our performance by storing all the settings in whichever cache we use. For high traffic sites this saves a lot of database access.