def METHOD_NAME(self, contest_id):
    """RPC to ask the worker to precache of files in the contest.
    contest_id (int): the id of the contest
    """
    lock = self.file_cacher.precache_lock()
    if lock is None:
        # Another worker is already precaching. Hence, this worker doesn't
        # need to do anything.
        logger.info("Another worker is already precaching files for "
                    "contest %d.", contest_id)
        return
    with lock:
        # In order to avoid a long-living connection, first fetch the
        # complete list of files and then download the files; since
        # this is just pre-caching, possible race conditions are not
        # dangerous
        logger.info("Precaching files for contest %d.", contest_id)
        with SessionGen() as session:
            contest = Contest.get_from_id(contest_id, session)
            files = enumerate_files(session,
                                    contest,
                                    skip_submissions=True,
                                    skip_user_tests=True,
                                    skip_print_jobs=True)
        for digest in files:
            try:
                self.file_cacher.cache_file(digest)
            except KeyError:
                # No problem (at this stage) if we cannot find the
                # file
                pass
        logger.info("Precaching finished.")