Refering to https://docs.phalcon.io/en/latest/reference/session.html#session-bags. I wanted to store data via SessionBag but when i want to access the data from another controller (which was called after the first one) data is gone. To give you a better point of view:
<?php
// SessionController.php:
class SessionController extends BaseController {
  // some code ...
  public function loginAction() {
      $this->persistent->foo = "bar";
      $this->flash->notice($this->persistent->foo);
      // some code ... like loading a form
      return $this->response->redirect();
  }
}
// IndexController.php:
class IndexController extends BaseController {
  public function indexAction(){
      $this->flash->notice($this->persistent->foo); // does not work
  }
}
Am I doing something wrong or did I misunderstood the documentation?
EDIT: Changed example to a more accurate one.