From afc062c18231f97ec85580da2a1cfa5f32988edd Mon Sep 17 00:00:00 2001 From: Thierry Jean <68975210+zilto@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:16:43 -0400 Subject: [PATCH] added in-memory caching to reference and concepts sections (#1211) --- 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