package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Module type
Class type

To use the cache, a client must implement the CLIENT interface.

type cached_value

The type of value to be stored in the cache.

val cache_index : index

The client must declare the index of the subcache where its values shall live. cache_index must be between 0 and List.length Constants_repr.cache_layout - 1.

val namespace : namespace

The client must declare a namespace. This namespace must be unique. Otherwise, the program stops. A namespace cannot contain '@'.

val value_of_identifier : Raw_context.t -> identifier -> (cached_value, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) result Lwt.t

value_of_identifier id builds the cached value identified by id. This function is called when the subcache is loaded into memory from the on-disk representation of its domain.

An error during the execution of this function is fatal as witnessed by its type: an error embedded in a tzresult is not supposed to be caught by the protocol.


Innovation. Community. Security.