mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Move default themes lookup before cache check
This commit is contained in:
parent
da9301f241
commit
024762f03b
@ -191,16 +191,16 @@ class ThemeResourceLoader implements Flushable
|
||||
*/
|
||||
public function findTemplate($template, $themes = null)
|
||||
{
|
||||
if ($themes === null) {
|
||||
$themes = SSViewer::get_themes();
|
||||
}
|
||||
|
||||
// Look for a cached result for this data set
|
||||
$cacheKey = md5(json_encode($template) . json_encode($themes));
|
||||
if ($this->getCache()->has($cacheKey)) {
|
||||
return $this->getCache()->get($cacheKey);
|
||||
}
|
||||
|
||||
if ($themes === null) {
|
||||
$themes = SSViewer::get_themes();
|
||||
}
|
||||
|
||||
$type = '';
|
||||
if (is_array($template)) {
|
||||
// Check if templates has type specified
|
||||
|
Loading…
x
Reference in New Issue
Block a user