270 releases

new 0.6.0-dev.9 Jun 18, 2025
0.6.0-dev.6 May 28, 2025
0.5.0-dev.21 Mar 3, 2025
0.5.0-dev.11 Dec 25, 2024
0.0.2 Jul 29, 2021

#244 in Magic Beans

Download history 334/week @ 2025-02-25 491/week @ 2025-03-04 240/week @ 2025-03-11 120/week @ 2025-03-18 210/week @ 2025-03-25 488/week @ 2025-04-01 369/week @ 2025-04-08 480/week @ 2025-04-15 738/week @ 2025-04-22 377/week @ 2025-04-29 580/week @ 2025-05-06 658/week @ 2025-05-13 327/week @ 2025-05-20 340/week @ 2025-05-27 178/week @ 2025-06-03 208/week @ 2025-06-10

1,068 downloads per month
Used in 9 crates (via holochain)

Apache-2.0

1.5MB
38K SLoC

The Cascade is a multi-tiered accessor for Holochain DHT data.

Note that the docs for this crate are admittedly a bit loose and imprecise, but they are not expected to be incorrect.

It is named "the Cascade" because it performs "cascading" gets across multiple sources. In general (but not in all cases), the flow is something like:

  • First attempts to read the local storage
  • If that fails, attempt to read data from the network cache
  • If that fails, do a network request for the data, caching it if found

Retrieve vs Get

There are two words used in cascade functions: "get", and "retrieve". They mean distinct things:

  • "get" ignores invalid data, and sometimes takes into account CRUD metadata before returning the data, so for instance, Deletes are allowed to annihilate Creates so that neither is returned. This is a more "refined" form of fetching data.
  • "retrieve" only fetches the data if it exists, without regard to validation status. This is a more "raw" form of fetching data.

holochain_cascade

Cascade

Retrieve vs Get

Get checks CRUD metadata before returning an the data where as retrieve only checks that where the data was found the appropriate validation has been run.

Dependencies

~89MB
~1.5M SLoC