Skip to content

Commit

Permalink
Explain how to enable/disable local caching (#5242)
Browse files Browse the repository at this point in the history
* Explain how to enable/disable local caching

Signed-off-by: Eduardo Apolinario <[email protected]>

* Update docs/user_guide/development_lifecycle/caching.md

Co-authored-by: David Espejo <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: David Espejo <[email protected]>
  • Loading branch information
eapolinario and davidmirror-ops authored Apr 19, 2024
1 parent 0095165 commit 35797ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/user_guide/development_lifecycle/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Task executions can be cached across different versions of the task because a ch
The flytekit package uses the [diskcache](https://github.com/grantjenks/python-diskcache) package, specifically [diskcache.Cache](http://www.grantjenks.com/docs/diskcache/tutorial.html#cache), to aid in the memoization of task executions. The results of local task executions are stored under `~/.flyte/local-cache/` and cache keys are composed of **Cache Version**, **Task Signature**, and **Task Input Values**.

Similar to the remote case, a local cache entry for a task will be invalidated if either the `cache_version` or the task signature is modified. In addition, the local cache can also be emptied by running the following command: `pyflyte local-cache clear`, which essentially obliterates the contents of the `~/.flyte/local-cache/` directory.
To disable the local cache, you can set the `local.cache_enabled` config option (e.g. by setting the environment variable `FLYTE_LOCAL_CACHE_ENABLED=False`).

:::{note}
The format used by the store is opaque and not meant to be inspectable.
Expand Down

0 comments on commit 35797ec

Please sign in to comment.