Skip to main content

ActionCache

Trait ActionCache 

Source
pub trait ActionCache: Send + Sync {
    // Required methods
    fn lookup(&self, action_digest: &Digest) -> Result<Option<ActionResult>>;
    fn update(
        &self,
        action_digest: &Digest,
        result: &ActionResult,
    ) -> Result<()>;
}
Expand description

A key/value store mapping action digests to ActionResult records.

Required Methods§

Source

fn lookup(&self, action_digest: &Digest) -> Result<Option<ActionResult>>

Look up the result recorded for action_digest, if any.

§Errors

Returns an error if the underlying storage fails or the stored ActionResult cannot be decoded.

Source

fn update(&self, action_digest: &Digest, result: &ActionResult) -> Result<()>

Record result as the outcome of action_digest. Overwrites any existing entry (last writer wins).

§Errors

Returns an error if the result cannot be encoded or persisted.

Implementors§