package yocaml

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

yocaml-2.0.0.tbz
sha256=fddf61500e828ac88d86ba982084cc817299302082a6e797b36787ff18235ec2
sha512=8b71a8cecd3e101df55eef0bba7a24d4dde9d66b5ecedd9f6d55834fcdc8d33fd875092ca73a398e1715664caee06cdc1bdb1b4da85bff0a687faac5c0445023

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:int -> 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 : (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:int -> 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 * int option) option

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

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.