@classmethod
def _dissolve_cache_key(cls, cache_key):
    """Extract a hashdigest and a bucket key from `cache_key`.

        A `cache_key` consists of a hash digest and a bucket key. Both
        parts here are extracted from the given string if possible and
        returned as a tuple ``(<hash_digest>, <bucket-key>)``.

        Both items of the tuple can be ``None`` if they could not be
        extracted.
        """
    if not isinstance(cache_key, str):
        return None, None
    if not '_' in cache_key:
        return None, None
    return cache_key.split('_', 1)
