def is_cache(cache):
if isinstance(cache, string_types + FILE_LIKE):<EOL><INDENT>try:<EOL><INDENT>return bool(len(read_cache(cache)))<EOL><DEDENT>except (TypeError, ValueError, UnicodeDecodeError, ImportError):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>if HAS_CACHE and isinstance(cache, Cache):<EOL><INDENT>return True<EOL><DEDENT>if (isinstance(cache, (list, tuple)) and cache and<EOL>all(map(is_cache_entry, cache))):<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
Returns `True` if ``cache`` is a readable cache file or object

    Parameters
    ----------
    cache : `str`, `file`, `list`
        Object to detect as cache

    Returns
    -------
    iscache : `bool`
        `True` if the input object is a cache, or a file in LAL cache format,
        otherwise `False`