'Constructor.
Args:
max_age: Cache expiration in seconds.'

def __init__(self, max_age):

    self._max_age = max_age
    self._file = os.path.join(tempfile.gettempdir(), FILENAME)
    f = LockedFile(self._file, 'a+', 'r')
    try:
        f.open_and_lock()
        if f.is_locked():
            _read_or_initialize_cache(f)
    except Exception as e:
        LOGGER.warning(e, exc_info=True)
    finally:
        f.unlock_and_close()
