How to know there is an update on a layer from inside GH?


I’m thinking about writing a component works similar to Geometry Pipeline.
I wrote a code to get a list of objects in a specified layer, but if I add more objects to this layer, nothing triggers update of this component.

Is there a smart way to trigger an update of a custom component, when a watching layer had some change?

Thank you.