You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To register event listeners that you want to instantiate yourself in the cache
62
-
kernel, overwrite ``getDefaultSubscribers``::
63
-
64
-
use FOS\HttpCache\SymfonyCache\UserContextSubscriber;
65
-
66
-
// ...
67
-
68
-
public function getDefaultSubscribers()
69
-
{
70
-
// get enabled listeners with default settings
71
-
$subscribers = parent::getDefaultSubscribers();
72
-
73
-
$subscribers[] = new UserContextListener(array(
74
-
'session_name_prefix' => 'eZSESSID',
75
-
));
76
-
77
-
$subscribers[] = new CustomListener();
78
-
79
-
return $subscribers;
80
-
}
81
-
82
-
You can also register event listeners from outside the kernel, e.g. in your
83
-
``app.php`` with the ``addListener`` and ``addSubscriber`` methods.
31
+
To adjust your cache kernel, follow the instructions in the :ref:`FOSHttpCache Symfony Cache documentation section <foshttpcache:symfony httpcache configuration>`.
0 commit comments