diff --git a/app/views/layouts/_menu.php b/app/views/layouts/_menu.php
index ad5cd7a..cd8a31a 100755
--- a/app/views/layouts/_menu.php
+++ b/app/views/layouts/_menu.php
@@ -1,31 +1,42 @@
- id, current_user()->level] do ?>
+ level;
+ $menu = Rails::cache()->read($key);
+
+ if (!$menu) :
+ ob_start();
+ ?>
- = $this->linkTo($this->t('.account._'), ['user#home'], ['onclick' => 'if(!User.run_login_onclick(event)) return false;', 'class' => 'login-button']) ?>
= $this->linkTo('■', '#', ['class' => 'submenu-button']) ?>
- - = $this->linkTo($this->t('.posts._'), ['controller' => 'post', 'action' => 'index']) ?>
- = $this->linkTo('■', '#', ['class' => 'submenu-button']) ?>
+
- = $this->linkTo($this->t('.posts._'), ['controller' => 'post', 'action' => 'index']) ?>
+ = $this->linkTo('■', '#', ['class' => 'submenu-button']) ?>
-
- = $this->formTag('post#', ['method' => 'get'], function(){ ?>
+ = $this->formTag('post#', ['method' => 'get'], function(){ ?>
= $this->textFieldTag('tags', '', ['id' => '']) ?>
- = $this->submitTag($this->t('.posts.search')) ?>
-
+ = $this->submitTag($this->t('.posts.search')) ?>
+
@@ -208,5 +219,16 @@
-
+ write($key, $menu);
+ endif;
+
+ if (!current_user()->is_anonymous()) {
+ $menu = substr_replace($menu, current_user()->id, strpos($menu, '-user.id-'), 9);
+ echo substr_replace($menu, current_user()->name, strpos($menu, '-user.name-'), 11);
+ } else {
+ echo $menu;
+ }
+ ?>