From 7194fcc7dc9e6611b7aa5bd516a1b2258b58bd99 Mon Sep 17 00:00:00 2001 From: zilto Date: Wed, 30 Oct 2024 14:26:16 -0400 Subject: [PATCH] added in-memory caching to reference and concepts sections --- docs/concepts/caching.rst | 99 ++++++++++++++++++++++++++++++- docs/reference/caching/stores.rst | 6 ++ 2 files changed, 102 insertions(+), 3 deletions(-) diff --git a/docs/concepts/caching.rst b/docs/concepts/caching.rst index d9da62144..29b2c965d 100644 --- a/docs/concepts/caching.rst +++ b/docs/concepts/caching.rst @@ -502,10 +502,11 @@ It is possible to directly interact with the metadata and result stores either b .. code-block:: python - from hamitlon.io.store import SQLiteMetadataStore, ShelveResultStore + from hamilton.caching.stores.sqlite import SQLiteMetadataStore + from hamilton.caching.stores.file import FileResultStore metadata_store = SQLiteMetadataStore(path="~/.hamilton_cache") - result_store = ShelveResultStore(path="/path/to/my/project") + result_store = FileResultStore(path="/path/to/my/project") metadata_store.get(context_key=...) result_store.get(data_version=...) @@ -532,7 +533,7 @@ A useful pattern is using the ``Driver.cache`` state or `structured logs