def __reduce_cache_count(self):
        if len(self._cache) <= self.capacity:
            return

        to_delete = len(self._cache) - self.capacity
        keys = list(self._cache.keys())

        for key in keys:
            if self._cache[key]['expiry'] is None:
                del self._cache[key]
                to_delete -= 1

            if to_delete == 0:
                return

        keys = list(self._cache.keys())

        for i in range(to_delete):
            del self._cache[keys[i]]

        return
Return a string representation of this check.
dataset/ETHPy150Open Lukasa/httpcache/httpcache/cache.py/HTTPCache.__reduce_cache_count--crossover with--dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/openstack/common/policy.py/TrueCheck.__str__