diff --git a/src/PhlySimplePage/PageCacheListener.php b/src/PhlySimplePage/PageCacheListener.php index 0980b3f..ec6bc24 100644 --- a/src/PhlySimplePage/PageCacheListener.php +++ b/src/PhlySimplePage/PageCacheListener.php @@ -63,8 +63,8 @@ public function __construct(AbstractAdapter $cache) */ public function attach(EventManagerInterface $events) { - $events->attach('route', array($this, 'onRoutePost'), -99); - $events->attach('finish', array($this, 'onFinishPost'), -10001); + $this->listeners[] = $events->attach('route', array($this, 'onRoutePost'), -99); + $this->listeners[] = $events->attach('finish', array($this, 'onFinishPost'), -10001); } /**