From 06cbd0723e415d81ea12aa48f2c37188741b2dbc Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 28 Nov 2013 23:32:44 -0500 Subject: [PATCH] Fixes #93 --- app/models/Setting.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/Setting.php b/app/models/Setting.php index 9894c22cdf..464c720f19 100644 --- a/app/models/Setting.php +++ b/app/models/Setting.php @@ -5,7 +5,13 @@ class Setting extends Elegant { public static function getSettings() { - return Setting::find(1); + static $static_cache = NULL; + + if (!$static_cache) { + $static_cache = Setting::find(1); + } + return $static_cache; + } }