Skip to content

Commit

Permalink
Fixes #93
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 29, 2013
1 parent 839d01a commit 06cbd07
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/models/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

}

0 comments on commit 06cbd07

Please sign in to comment.