@@ -40,7 +40,7 @@ trait ``FOS\HttpCache\SymfonyCache\EventDispatchingHttpCache``::
4040 use EventDispatchingHttpCache;
4141
4242 /**
43- * Made public to allow event subscribers to do refresh operations.
43+ * Made public to allow event listeners to do refresh operations.
4444 *
4545 * {@inheritDoc}
4646 */
@@ -86,14 +86,14 @@ the listeners you need there::
8686
8787 use FOS\HttpCache\SymfonyCache\DebugListener();
8888 use FOS\HttpCache\SymfonyCache\CustomTtlListener();
89- use FOS\HttpCache\SymfonyCache\PurgeSubscriber ;
90- use FOS\HttpCache\SymfonyCache\RefreshSubscriber ;
91- use FOS\HttpCache\SymfonyCache\UserContextSubscriber ;
89+ use FOS\HttpCache\SymfonyCache\PurgeListener ;
90+ use FOS\HttpCache\SymfonyCache\RefreshListener ;
91+ use FOS\HttpCache\SymfonyCache\UserContextListener ;
9292
9393 // ...
9494
9595 /**
96- * Overwrite constructor to register event subscribers for FOSHttpCache.
96+ * Overwrite constructor to register event listeners for FOSHttpCache.
9797 */
9898 public function __construct(
9999 HttpKernelInterface $kernel,
@@ -104,9 +104,9 @@ the listeners you need there::
104104 parent::__construct($kernel, $store, $surrogate, $options);
105105
106106 $this->addSubscriber(new CustomTtlListener());
107- $this->addSubscriber(new PurgeSubscriber ());
108- $this->addSubscriber(new RefreshSubscriber ());
109- $this->addSubscriber(new UserContextSubscriber ());
107+ $this->addSubscriber(new PurgeListener ());
108+ $this->addSubscriber(new RefreshListener ());
109+ $this->addSubscriber(new UserContextListener ());
110110 if (isset($options['debug']) && $options['debug']) {
111111 $this->addSubscriber(new DebugListener());
112112 }
@@ -120,7 +120,7 @@ Purge
120120~~~~~
121121
122122To support :ref: `cache invalidation <cache invalidate >`, register the
123- ``PurgeSubscriber ``. If the default settings are right for you, you don't
123+ ``PurgeListener ``. If the default settings are right for you, you don't
124124need to do anything more.
125125
126126Purging is only allowed from the same machine by default. To purge data from
@@ -146,14 +146,14 @@ Refresh
146146~~~~~~~
147147
148148To support :ref: `cache refresh <cache refresh >`, register the
149- ``RefreshSubscriber ``. You can pass the constructor an option to specify
149+ ``RefreshListener ``. You can pass the constructor an option to specify
150150what clients are allowed to refresh cache entries. Refreshing is only allowed
151151from the same machine by default. To refresh from other hosts, provide the
152152IPs of the machines allowed to refresh, or provide a RequestMatcher that
153153checks for an Authorization header or similar. *Only set one of
154154``client_ips`` or ``client_matcher`` *.
155155
156- The refresh subscriber needs to access the ``HttpCache::fetch `` method which
156+ The refresh listener needs to access the ``HttpCache::fetch `` method which
157157is protected on the base HttpCache class. The ``EventDispatchingHttpCache ``
158158exposes the method as public, but if you implement your own kernel, you need
159159to overwrite the method to make it public.
@@ -174,7 +174,7 @@ User Context
174174~~~~~~~~~~~~
175175
176176To support :doc: `user context hashing <user-context >` you need to register the
177- ``UserContextSubscriber ``. The user context is then automatically recognized
177+ ``UserContextListener ``. The user context is then automatically recognized
178178based on session cookies or authorization headers. If the default settings are
179179right for you, you don't need to do anything more. You can customize a number of
180180options through the constructor:
@@ -230,9 +230,9 @@ options through the constructor:
230230Cleaning the Cookie Header
231231^^^^^^^^^^^^^^^^^^^^^^^^^^
232232
233- By default, the UserContextSubscriber only sets the session cookie (according to
233+ By default, the UserContextListener only sets the session cookie (according to
234234the ``session_name_prefix `` option) in the requests to the backend. If you need
235- a different behavior, overwrite ``UserContextSubscriber ::cleanupHashLookupRequest ``
235+ a different behavior, overwrite ``UserContextListener ::cleanupHashLookupRequest ``
236236with your own logic.
237237
238238.. _symfonycache_customttl :
@@ -242,11 +242,11 @@ Custom TTL
242242
243243.. include :: includes/custom-ttl.rst
244244
245- The ``CustomTtlSubscriber `` looks at a specific header to determine the TTL,
245+ The ``CustomTtlListener `` looks at a specific header to determine the TTL,
246246preferring that over ``s-maxage ``. The default header is ``X-Reverse-Proxy-TTL ``
247- but you can customize that in the subscriber constructor::
247+ but you can customize that in the listener constructor::
248248
249- new CustomTtlSubscriber ('My-TTL-Header');
249+ new CustomTtlListener ('My-TTL-Header');
250250
251251The custom header is removed before sending the response to the client.
252252
0 commit comments