-
-
Notifications
You must be signed in to change notification settings - Fork 929
Description
Description
The responsibility of these two listeners originates from the same initial trigger point. A database entity has been updated so we should clear cache and notify of changes.
The PurgeHttpCacheListener
has some extended functionality to gather relations as well which the PublishMercureUpdatesListener
should probably do as well.
My thoughts would be to create a single listener with the extended functionality that the PurgeHttpCacheListener
has. This can collect all the relevant iris and objects to publish on the onFlush
and PostFlush
event.
A simple change to allow a method to be public, like addTagsFor
method, would allow any user to also populate any other resource changes outside of the scope of the doctrine database changes and I think a really neat little addition for lots of flexibility.
the onFlush
could have the detection of which services are enabled and available and then purge caches and publish updates accordingly.
In my case... it may be nice to have 2 iri converters in place in the constructor as well, so one can be replaced for mercure if required.
Thoughts on this update much appreciated before the work. Probably includes BC breaks though so... may need to be approached with caution.