title: Cakephp redirection after submission
body: <p>I'm developing an application with Cakephp and I can't find my answer in existing topics... </p>
  
  <p>I have a main menu with several action (Edit/Delete/Add) which is manage sockets. When I edit a socket and I submit my update, my socket is updated correctly BUT my redirection on the main menu doesn't work. The URL stay the same.
  For example, I edit socket with <strong>id = 2</strong>. The application go to <strong>'/my/app/sockets/edit/2'</strong>. After update and submit, the application should redirect to <strong>'/my/app/sockets/index'</strong> but it doesn't work. </p>
  
  <p>Below, you can see my code.
  <strong>SocketsController.php :</strong> </p>
  
  <pre><code>public function index($searchCloset = null) {
  
      $this-&gt;Paginator-&gt;settings = $this-&gt;paginate;
      if($searchCloset != null) {
          $sockets = $this-&gt;paginate('Socket', array(
              'Closet.name LIKE' =&gt; $searchCloset
          ));
      }
      else{
          $sockets = $this-&gt;paginate('Socket');
          $searchCloset = '' ;
      } 
  
      $this-&gt;set('sockets',$sockets);
      $this-&gt;set('closets',$this-&gt;Socket-&gt;Closet-&gt;find('all'));
      $this-&gt;set('searchCloset',$searchCloset);
  }
  public function edit($id = null){
      // Bad socket management
      if (!$id) {
          throw new NotFoundException(__('Invalid socket'));
      }
  
      $socket = $this-&gt;Socket-&gt;findByid_socket($id);
      if (!$socket) {
          throw new NotFoundException(__('Invalid socket'));
      }
  
      // if there's a submit
      if ($this-&gt;request-&gt;is(array('post'))) {
          $this-&gt;Socket-&gt;id = $id;
          if ($this-&gt;Socket-&gt;save($this-&gt;request-&gt;data)) {
              // update 'lastchange' column
              if($this-&gt;updateSocketStatus($this-&gt;Socket-&gt;id)){
                  $this-&gt;Session-&gt;setFlash(__('Your socket has been updated.'));
              }
              else {
                  $this-&gt;Session-&gt;setFlash(__('Unable to create history.'));
              }
          }
          else {
              $this-&gt;Session-&gt;setFlash(__('Unable to update your socket.'));
          }
  
          return $this-&gt;redirect(array('controller' =&gt; 'sockets','action' =&gt; 'index'));
      }    
  
      // send all informations about the socket to the view
      $this-&gt;set('socket',$socket);
      // send closets list to the view (select menu)
      $this-&gt;set('closets',$this-&gt;Socket-&gt;Closet-&gt;find('list',array(
          'fields' =&gt; array('Closet.id_closet','Closet.name')
      )));
  }
  </code></pre>
  
  <p><strong>edit.ctp :</strong></p>
  
  <pre><code>&lt;h2&gt;Edit socket&lt;/h2&gt;
  &lt;div&gt;&lt;?php 
  echo $this-&gt;Form-&gt;create('Socket');
  echo $this-&gt;Form-&gt;input('Socket.name', array(
      'label' =&gt; 'Socket name :',
      'default' =&gt; $socket['Socket']['name']
      ));
  echo $this-&gt;Form-&gt;input('Socket.location', array(
      'label' =&gt; 'Location :',
      'default' =&gt; $socket['Socket']['location']
      ));
  echo $this-&gt;Form-&gt;input('Socket.comment', array(
      'label' =&gt; 'Comment :',
      'default' =&gt; $socket['Socket']['comment']
      ));
  echo $this-&gt;Form-&gt;input('Socket.closet_id',array(
      'type' =&gt; 'select',
      'label' =&gt; 'Closet :',
      'options' =&gt; $closets,
      'default' =&gt; $socket['Closet']['id_closet']
  ));
  echo $this-&gt;Form-&gt;end('Save socket');
  echo $this-&gt;Form-&gt;postButton(
          'Back',
          array('controller' =&gt; 'sockets','action' =&gt; 'index'),
          array(
              'id' =&gt; 'back_button',
              'class' =&gt; 'ui-btn ui-btn-inline ui-icon-back ui-btn-icon-left'
          )
  );
  ?&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I've already search and it could be a cache problem.
  Thanks in advance.</p>