##### 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.

from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
                    'status': ['preview'],
                    'supported_by': 'community'}
DOCUMENTATION = '''
module: package_facts
short_description: package information as facts
description:
  - Return information about installed packages as facts
options:
  manager:
    description:
      - The package manager used by the system so we can query the package information.
      - Since 2.8 this is a list and can support multiple package managers per system.
      - The 'portage' and 'pkg' options were added in version 2.8.
    default: ['auto']
    choices: ['auto', 'rpm', 'apt', 'portage', 'pkg']
    required: False
    type: list
  strategy:
    description:
      - This option controls how the module queres the package managers on the system.
        C(first) means it will return only information for the first supported package manager available.
        C(all) will return information for all supported and available package managers on the system.
    choices: ['first', 'all']
    default: 'first'
    version_added: "2.8"