Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Persistent data cannot been deleted?

I wrote some code to save user search conditions, and I use persistent service, but I got a big problem, because the persistent data cannot been deleted:

unset($this->persistent->conditions);
$conditions = $this->persistent->conditions;
var_dump($conditions);die();

Conditions output again, also not work using: $this->persistent->remove('conditions') Why did this happen?



33.6k
Accepted
answer

You have to use:

$this->persistent->destroy();