<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gzip_cache(path):
 """ Another GZIP handler for Bottle functions. This may be used to cache the files statically on the disc on given `path`. If the browser accepts GZIP and there is file at ``path + ".gz"``, this file is returned, correct headers are set (Content-Encoding, Last-Modified, Content-Length, Date and so on). If the browser doesn't accept GZIP or there is no ``.gz`` file at same path, normal file is returned. Args: path (str):
 Path to the cached file. Returns: obj: Opened file. """

    accept_enc = request.get_header("Accept-Encoding")

    if accept_enc and "gzip" in accept_enc and os.path.exists(path + ".gz"):
        path = path + ".gz"
        response.set_header("Content-Encoding", "gzip")

    stats = os.stat(path)

    headers = dict()
    headers['Content-Length'] = stats.st_size
    headers['Last-Modified'] = time.strftime(
        "%a, %d %b %Y %H:%M:%S GMT",
        time.gmtime(stats.st_mtime)
    )

    # I need to set `headers` dict for optional HTTPResponse use, but also set
    # hedears using `response.set_header()` for normal use
    for key, val in headers.iteritems():
        response.set_header(key, val)

    modified_since = request.environ.get('HTTP_IF_MODIFIED_SINCE')
    if modified_since:
        modified_since = parse_date(modified_since.split(";")[0].strip())

    if modified_since is not None and modified_since >= int(stats.st_mtime):
        headers['Date'] = time.strftime(
            "%a, %d %b %Y %H:%M:%S GMT",
            time.gmtime()
        )
        return HTTPResponse(status=304, **headers)

    return open(path)