def read_cache(cachefile, coltype=LIGOTimeGPS, sort=None, segment=None):
<EOL>if not isinstance(cachefile, FILE_LIKE):<EOL><INDENT>with open(file_path(cachefile), '<STR_LIT:r>') as fobj:<EOL><INDENT>return read_cache(fobj, coltype=coltype, sort=sort,<EOL>segment=segment)<EOL><DEDENT><DEDENT>cache = [x.path for x in _iter_cache(cachefile, gpstype=coltype)]<EOL>if segment:<EOL><INDENT>cache = sieve(cache, segment=segment)<EOL><DEDENT>if sort:<EOL><INDENT>cache.sort(key=sort)<EOL><DEDENT>return cache<EOL>
Read a LAL- or FFL-format cache file as a list of file paths

    Parameters
    ----------
    cachefile : `str`, `file`
        Input file or file path to read.

    coltype : `LIGOTimeGPS`, `int`, optional
        Type for GPS times.

    sort : `callable`, optional
        A callable key function by which to sort the output list of file paths

    segment : `gwpy.segments.Segment`, optional
        A GPS `[start, stop)` interval, if given only files overlapping this
        interval will be returned.

    Returns
    -------
    paths : `list` of `str`
        A list of file paths as read from the cache file.