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 | 1 | <?php |
| 2 | 2 | use artbox\catalog\helpers\FilterHelper; |
| 3 | + use artbox\core\components\AliasCache; | |
| 3 | 4 | use artbox\core\components\SeoComponent; |
| 4 | 5 | |
| 5 | 6 | return [ |
| ... | ... | @@ -75,5 +76,8 @@ |
| 75 | 76 | 'useFilename' => true, |
| 76 | 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 | 19 | 'google' => 'https://plus.google.com/+ArtwebUaAgency', |
| 20 | 20 | 'twitter' => 'https://twitter.com/ArtWeb_ua', |
| 21 | 21 | 'name' => 'Artweb', |
| 22 | - 'logo' => '11', | |
| 22 | + 'logo' => '', | |
| 23 | 23 | 'about' => 'Строим бизнес в онлайне', |
| 24 | 24 | 'analytics_key' => '119240817', |
| 25 | 25 | 'robots' => 'User-agent: Google | ... | ... |
frontend/controllers/CategoryController.php
| ... | ... | @@ -93,14 +93,14 @@ |
| 93 | 93 | */ |
| 94 | 94 | $model = Category::findWithFilters($id) |
| 95 | 95 | ->with('lang.alias') |
| 96 | - ->with('categories.lang') | |
| 96 | + ->with('categories.lang.alias') | |
| 97 | 97 | ->with( |
| 98 | 98 | [ |
| 99 | 99 | 'parent' => function ($query) { |
| 100 | 100 | /** |
| 101 | 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
frontend/views/layouts/_category_menu.php