Lock solver when editing blocks

Is it possible to automatically lock the GH solver when editing blocks in Rhino? Otherwise any GH pushes that are open cache the virtual geometry inside the block.

As a workaround, you may detect whether Rhino is in block edit mode and prevent component from running.

If this happens and you edit the block to remove the offending geometry you break the Caching widget and have to make a new one.

Thank you. I would have to add this code to 1000+ clusters that conating only Grasshopper logic?