cache.enable_compilation_cache
cache.enable_compilation_cache(directory=None)Point JAX’s persistent compilation cache at a stable directory.
Safe to call more than once and safe to call late — JAX reads the setting when it compiles, not when it imports. Set CADJOINT_NO_COMPILATION_CACHE=1 to opt out.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| directory | str | os.PathLike[str] | None | Cache location; defaults to :func:cache_directory. |
None |
Returns
| Name | Type | Description |
|---|---|---|
| Path | None | The directory in use, or None when caching is disabled or |
|
| Path | None | unavailable in this JAX build. |