php - Configure Phalcon Flash output to use specific session adapter


I'm using the Phalcon flash service to store temporary messages between HTTP redirects.

It worked great until I recently changed to a database session adapter. Now flash messages are being stored in the database but are not being deleted.

I don't want these messages to touch the database so I setup the previous session method in the DI but under a new tempSession entry.

public function initTempSession($options = [])
        function () {
            $tempSession = new PhSession();
            return $tempSession;

How can I configure the flash service to use this session function, rather than the 'default' database adapter?

People are also looking for solutions to the problem: codeigniter - why am i getting an error from file mysqli/mysqli_driver.php?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.