Disable caching form seems broken. It doesn't have a starting set of fields to populate to Add them to begin with. When I do show them with a minor code tweak, add button fails, etc, etc.
Go to Edge Modules. Click Disable Caching. Form comes up, with just "Disable caching for", and then the Add button, with nothing in between.
Tweak to get the initial blank fields: in DisableCacheForm(), first for loop goes to <=, not just <
I continued with filling that out, hitting the Add button.
Ok, after that, DisableCacheForm->buildForm doesn't see newly passed values in $form_state. So then the line $form_state->get('rules') is false, and we set rules to 0, which is messed up, and addRule method doesn't know what $rules['actions'] are, and fails there.
That's about as far as I got in debugging before stopping for time.
Note: even on clicking the button, buildForm() gets executed before addRule().
Also, setting rules to a number vs an array of values - does it make sense?
Needs review
4.0
Code