<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
<!--- Explain the problem briefly below -->
I set cache settings in inventory and inventory plugin script ini section according to the docs, but cache isn't created. I tried with jsonfile cache plugin. 
Docs:
[https://docs.ansible.com/ansible/latest/plugins/cache.html#enabling-inventory-cache-plugins](https://docs.ansible.com/ansible/latest/plugins/cache.html#enabling-inventory-cache-plugins)
[https://docs.ansible.com/ansible/latest/plugins/inventory/script.html](https://docs.ansible.com/ansible/latest/plugins/inventory/script.html)
##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
<!--- !component =lib/ansible/plugins/inventory/script.py-->
inventory plugin script
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.5/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible
  python version = 3.5.2 (default, Oct  8 2019, 13:06:37) [GCC 5.4.0 20160609]
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/etc/ansible/ansible.cfg) = /tmp
INVENTORY_CACHE_ENABLED(/etc/ansible/ansible.cfg) = True
INVENTORY_CACHE_PLUGIN(/etc/ansible/ansible.cfg) = jsonfile
INVENTORY_CACHE_PLUGIN_CONNECTION(/etc/ansible/ansible.cfg) = /tmp
INVENTORY_CACHE_TIMEOUT(/etc/ansible/ansible.cfg) = 600
INVENTORY_PLUGIN_SCRIPT_CACHE(/etc/ansible/ansible.cfg) = True
```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --
Ubuntu 16.04
>


##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
1. Set configuration file for inventory cache with jsonfile plugin
2. Run playbook with invetory script plugin source

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
JSON inventory file in /tmp folder

##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
JSON inventory file isn't created


try:
                        got = data_from_meta.get(host, {})
                    except AttributeError as e:
                        raise AnsibleError("Improperly formatted host information for %s: %s" % (host, to_native(e)), orig_exc=e)
                self._populate_host_vars([host], got)
        except Exception as e:
            raise AnsibleParserError(to_native(e))
    def _parse_group(self, group, data):
        group = self.inventory.add_group(group)
        if not isinstance(data, dict):
            data = {'hosts': data}
        
        elif not any(k in data for k in ('hosts', 'vars', 'children')):
            data = {'hosts': [group], 'vars': data}
        if 'hosts' in data:
            if not isinstance(data['hosts'], list):
                raise AnsibleError("You defined a group '%s' with bad data for the host list:\n %s" % (group, data))
            for hostname in data['hosts']:
                self._hosts.add(hostname)
                self.inventory.add_host(hostname, group)
        if 'vars' in data:
            if not isinstance(data['vars'], dict):
                raise AnsibleError("You defined a group '%s' with bad data for variables:\n %s" % (group, data))
            for k, v in iteritems(data['vars']):
                self.inventory.set_variable(group, k, v)
        if group != '_meta' and isinstance(data, dict) and 'children' in data:
            for child_name in data['children']:
                child_name = self.inventory.add_group(child_name)
                self.inventory.add_child(group, child_name)
    def get_host_variables(self, path, host):