def cache_data(self, cache_directory: str) -> None:
        """
        When you call this method, we will use this directory to store a cache of already-processed
        ``Instances`` in every file passed to :func:`read`, serialized as one string-formatted
        ``Instance`` per line.  If the cache file for a given ``file_path`` exists, we read the
        ``Instances`` from the cache instead of re-processing the data (using
        :func:`deserialize_instance`).  If the cache file does `not` exist, we will `create` it on
        our first pass through the data (using :func:`serialize_instance`).

        IMPORTANT CAVEAT: It is the `caller's` responsibility to make sure that this directory is
        unique for any combination of code and parameters that you use.  That is, if you call this
        method, we will use any existing cache files in that directory `regardless of the
        parameters you set for this DatasetReader!`  If you use our commands, the ``Train`` command
        is responsible for calling this method and ensuring that unique parameters correspond to
        unique cache directories.  If you don't use our commands, that is your responsibility.
        """
        self._cache_directory = pathlib.Path(cache_directory)
        os.makedirs(self._cache_directory, exist_ok=True)