Documentation

Lake.Config.Cache

structure Lake.Cache :

The Lake cache directory.

Instances For

    Returns whether the Lake cache is disabled.

    An empty directory string indicates the cache is disabled.

    Equations
      Instances For
        @[inline]

        Returns the artifact directory for the Lake cache.

        Equations
          Instances For
            def Lake.Cache.artifactPath (cache : Cache) (contentHash : Hash) (ext : String := "art") :

            Returns the path to artifact in the Lake cache with extension ext.

            Equations
              Instances For
                def Lake.Cache.getArtifact? (cache : Cache) (contentHash : Hash) (ext : String := "art") :

                Returns the path to the artifact in the Lake cache with extension ext if it exists.

                If the Lake cache is disabled, the behavior of this function is undefined.

                Equations
                  Instances For
                    @[inline]

                    The file where the package's input mapping is stored in the Lake cache.

                    Equations
                      Instances For

                        The file where a package's input mapping is stored in the Lake cache.

                        Equations
                          Instances For
                            @[reducible, inline]

                            Maps an input hash to a structure of artifact content hashes.

                            These mappings are stored in a per-package JSON Lines file in the Lake cache.

                            Equations
                              Instances For

                                Load a CacheMap from a JSON Lines file.

                                Equations
                                  Instances For
                                    def Lake.CacheMap.save (inputsFile : System.FilePath) (cache : CacheMap) :

                                    Save a CacheMap to a JSON Lines file. Entries already in the file but not in the map will not be removed.

                                    Equations
                                      Instances For
                                        def Lake.CacheMap.get? (inputHash : Hash) (cache : CacheMap) :

                                        Returns the output data associated with the input hash in the cache.

                                        Equations
                                          Instances For
                                            def Lake.CacheMap.insertCore (inputHash : Hash) (val : Lean.Json) (cache : CacheMap) :

                                            Associate output data (as JSON) with the given the input hash.

                                            Equations
                                              Instances For
                                                @[inline]
                                                def Lake.CacheMap.insert {α : Type u_1} [Lean.ToJson α] (inputHash : Hash) (val : α) (cache : CacheMap) :

                                                Associate output data with the given the input hash.

                                                Equations
                                                  Instances For
                                                    @[reducible, inline]

                                                    A mutable reference to a CacheMap.

                                                    Equations
                                                      Instances For
                                                        @[inline]
                                                        def Lake.CacheRef.get? (inputHash : Hash) (cache : CacheRef) :

                                                        Returns the output data associated with the input hash in the cache.

                                                        Equations
                                                          Instances For
                                                            @[inline]
                                                            def Lake.CacheRef.insert {α : Type u_1} [Lean.ToJson α] (inputHash : Hash) (val : α) (cache : CacheRef) :

                                                            Associate output data with the given the input hash.

                                                            Equations
                                                              Instances For