Commit a509da1c27fdf2e9dc12f2f6c7694db3a74635bb
1 parent
fc66ded4
Artbox epic performance fix
Showing
5 changed files
with
9 additions
and
5 deletions
Show diff stats
common/config/main.php
1 | <?php | 1 | <?php |
2 | use artbox\catalog\helpers\FilterHelper; | 2 | use artbox\catalog\helpers\FilterHelper; |
3 | + use artbox\core\components\AliasCache; | ||
3 | use artbox\core\components\SeoComponent; | 4 | use artbox\core\components\SeoComponent; |
4 | 5 | ||
5 | return [ | 6 | return [ |
@@ -75,5 +76,8 @@ | @@ -75,5 +76,8 @@ | ||
75 | 'useFilename' => true, | 76 | 'useFilename' => true, |
76 | 'absoluteUrl' => false, | 77 | 'absoluteUrl' => false, |
77 | ], | 78 | ], |
79 | + 'aliasCache' => [ | ||
80 | + 'class' => AliasCache::className(), | ||
81 | + ], | ||
78 | ], | 82 | ], |
79 | ]; | 83 | ]; |
common/config/settings.php
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | 'google' => 'https://plus.google.com/+ArtwebUaAgency', | 19 | 'google' => 'https://plus.google.com/+ArtwebUaAgency', |
20 | 'twitter' => 'https://twitter.com/ArtWeb_ua', | 20 | 'twitter' => 'https://twitter.com/ArtWeb_ua', |
21 | 'name' => 'Artweb', | 21 | 'name' => 'Artweb', |
22 | - 'logo' => '11', | 22 | + 'logo' => '', |
23 | 'about' => 'Строим бизнес в онлайне', | 23 | 'about' => 'Строим бизнес в онлайне', |
24 | 'analytics_key' => '119240817', | 24 | 'analytics_key' => '119240817', |
25 | 'robots' => 'User-agent: Google | 25 | 'robots' => 'User-agent: Google |
frontend/controllers/CategoryController.php
@@ -93,14 +93,14 @@ | @@ -93,14 +93,14 @@ | ||
93 | */ | 93 | */ |
94 | $model = Category::findWithFilters($id) | 94 | $model = Category::findWithFilters($id) |
95 | ->with('lang.alias') | 95 | ->with('lang.alias') |
96 | - ->with('categories.lang') | 96 | + ->with('categories.lang.alias') |
97 | ->with( | 97 | ->with( |
98 | [ | 98 | [ |
99 | 'parent' => function ($query) { | 99 | 'parent' => function ($query) { |
100 | /** | 100 | /** |
101 | * @var ActiveQuery $query | 101 | * @var ActiveQuery $query |
102 | */ | 102 | */ |
103 | - $query->with('lang', 'categories.lang'); | 103 | + $query->with('lang.alias', 'categories.lang.alias'); |
104 | }, | 104 | }, |
105 | ] | 105 | ] |
106 | ) | 106 | ) |
frontend/views/category/view.php
@@ -372,4 +372,4 @@ _________________________________________________________ --> | @@ -372,4 +372,4 @@ _________________________________________________________ --> | ||
372 | </div> | 372 | </div> |
373 | <!-- /.container --> | 373 | <!-- /.container --> |
374 | </div> | 374 | </div> |
375 | -<!-- /#content --> | 375 | -<!-- /#content --> |
376 | +<!-- /#content --> | ||
376 | \ No newline at end of file | 377 | \ No newline at end of file |
frontend/views/layouts/_category_menu.php
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | * @var bool $isHome | 8 | * @var bool $isHome |
9 | */ | 9 | */ |
10 | $categories = Category::find() | 10 | $categories = Category::find() |
11 | - ->with('categories.lang', 'lang') | 11 | + ->with('categories.lang.alias', 'lang.alias') |
12 | ->where([ 'level' => 0 ]) | 12 | ->where([ 'level' => 0 ]) |
13 | ->all(); | 13 | ->all(); |
14 | ?> | 14 | ?> |