##### SUMMARY

In several comments on this PR, it was noted that the 2.8.x apt package facts has a large performance regression: https://github.com/ansible/ansible/pull/56008#issuecomment-496931379

The reported difference is about 1m30s  vs 8s for a fixed version.

Looking at the fixed version versus 2.8x and devel code, it looks like the issue is that creating an empty apt package cache takes a measurable amount of time.  Doing that in a loop for each package adds up significantly.  This can be fixed by reusing the empty cache rather than recreating a new one every single time.  I asked for people to test with the following change and they report that it fixes the problem:
``` patch
     @property
     def pkg_cache(self):
-        if self._cache:
+        if self._cache is not None:
             return self._cache
 
         self._cache = self._lib.Cache()
         return self._cache
```

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
package_facts.py

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.8.x devel
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
N/A
```

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

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->

<!--- Paste example playbooks or commands between quotes below -->
```yaml

```

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

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
Package facts gathered in under 10s

##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
Package facts gathered in over a minute.

break
        
        if pkgmgr in seen:
            continue
        seen.add(pkgmgr)
        try:
            try:
                
                manager = PKG_MANAGERS[pkgmgr]()
                if manager.is_available():
                    found += 1
                    packages.update(manager.get_packages())
            except Exception as e:
                if pkgmgr in module.params['manager']:
                    module.warn('Requested package manager %s was not usable by this module: %s' % (pkgmgr, to_text(e)))
                continue
            for warning in getattr(manager, 'warnings', []):
                module.warn(warning)
        except Exception as e:
            if pkgmgr in module.params['manager']:
                module.warn('Failed to retrieve packages with %s: %s' % (pkgmgr, to_text(e)))
    if found == 0:
        module.fail_json(msg='Could not detect a supported package manager from the following list: %s' % managers)
    
    
    results['ansible_facts']['packages'] = packages
    module.exit_json(**results)
if __name__ == '__main__':
    main()