package yocaml

  1. Overview
  2. Docs
Core engine of the YOCaml Static Site Generator

Install

dune-project
 Dependency

Authors

Maintainers

Sources

yocaml-3.0.1.tbz
sha256=9091d2c578cfbd15ff87f3d0dc9a64f9e02e714a22d37da14823083ec46a51b1
sha512=22231c3852a8345b6a6947c367e7cc311b57ccf2869a5d7c681384e7c0c18f0a17217ebc04ae9523833941ac71f136185cdc75090fe0849fa42a4f8a01d5e203

doc/yocaml/Yocaml/Cache/index.html

Module Yocaml.CacheSource

The cache is an artifact of the previous build that tracks information about build targets, including dynamic dependencies, and maintains a hashed version of the targets.

Types

Sourcetype t

A representation of the cache (a map indexed by Path.t).

Sourcetype entry

An entry of the cache.

Building

Sourceval entry : ?last_build_date:float -> string -> Deps.t -> entry

entry ?last_build_date hashed_content deps creates an entry.

Sourceval empty : t

empty returns an empty cache.

Sourceval from_list : ?trace:Trace.t -> (Path.t * entry) list -> t

from_list l creates a cache from a list.

Cache interaction

Sourceval update : t -> Path.t -> ?deps:Deps.t -> now:float -> string -> t

update cache path ?deps ~now content updates the cache for the path entry. If an entry already existed at the given key, it will be deleted.

Sourceval get : t -> Path.t -> (string * Deps.t * float option) option

get cache path returns the associated hash content, deps set and the last build date for a given path.

Sourceval trace : t -> Trace.t

Returns the trace of built artifact.

Sourceval mark : t -> Path.t -> t

mark path add path into the trace.

Serialization/Deserialization

Supports serialization and deserialization of cache.

Sourceval to_sexp : t -> Sexp.t

to_sexp cache Converts a cache into a Sexp.

Sourceval from_sexp : Sexp.t -> (t, Sexp.invalid) result

from_sexp sexp try to converts a Sexp into a cache.

Utils

Sourceval pp : Format.formatter -> t -> unit

Pretty printer for caches.

Sourceval equal : t -> t -> bool

Equality between caches.