function onEditPrepare(node) {
        // initial checkbox states
        // if (!node.persistence) node.persistence = false
        if (!node.cacheall) node.persistence = false

        // Make sure that the key always has a value (and is not '') - default to msg.topic
        if ( !node.cacheKey ) node.cacheKey = 'topic'

        if ( !node.varName ) {
            node.varName = 'uib_cache'
            $('#node-input-varName').val('uib_cache')
        }

        // Populate Type dropdown: node, flow, global
        $('#node-input-storeContext').typedInput({
            // @ts-ignore
            type: 'contextType',
            types: [
                {
                    value: 'contextType',
                    options: [
                        { value: 'context', label: 'Node', },
                        { value: 'flow', label: 'Flow', },
                        { value: 'global', label: 'Global', },
                    ],
                }
            ],
        })

        // Set up context store select drop-down
        populateUseStoreDropdown()

        // Update help text if Cache By value changes
        $('#node-input-cacheKey').on('change', function() {
            $('#help-per').html( helpTextNumMsgsCacheBy() )
        })

        // Either all or by prop, not both
        $('#node-input-cacheall').on('change', function() {
            keyVisibility(!$(this).is(':checked'))
        })

        $('#node-input-storeContext').on('change', function() {
            if ( $(this).val() === 'context' ) {
                $('#node-input-varName')
                    .val('uib_cache')
                    .prop( 'disabled', true )
            } else {
                $('#node-input-varName')
                    .val(`uib_cache_${node.id}`)
                    .prop( 'disabled', false )
            }
        })

        uibuilder.doTooltips('#ti-edit-panel') // Do this at the end
    } // ----- end of onEditPrepare() ----- //
Prep for edit
@param {*} node A node instance as seen from the Node-RED Editor