Skip to content

Commit

Permalink
Fix incorrect imports in task caching example (#15445)
Browse files Browse the repository at this point in the history
  • Loading branch information
desertaxle authored Sep 20, 2024
1 parent 4ee7d12 commit d9c51bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/3.0/develop/task-caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ For example:
```python
from prefect import task
from prefect.cache_policies import TASK_SOURCE, INPUTS
from prefect.isolation_levels import SERIALIZABLE
from prefect.transactions import IsolationLevel
from prefect.locking.filesystem import FileSystemLockManager

cache_policy = (INPUTS + TASK_SOURCE).configure(
isolation_level=SERIALIZABLE,
isolation_level=IsolationLevel.SERIALIZABLE,
lock_manager=FileSystemLockManager(lock_files_directory="path/to/lock/files"),
)

Expand All @@ -270,12 +270,12 @@ We recommend using the `RedisLockManager` provided by `prefect-redis` in conjunc
```python
from prefect import task
from prefect.cache_policies import TASK_SOURCE, INPUTS
from prefect.isolation_levels import SERIALIZABLE
from prefect.transactions import IsolationLevel

from prefect_redis import RedisLockManager

cache_policy = (INPUTS + TASK_SOURCE).configure(
isolation_level=SERIALIZABLE,
isolation_level=IsolationLevel.SERIALIZABLE,
lock_manager=RedisLockManager(host="my-redis-host"),
)

Expand Down

0 comments on commit d9c51bc

Please sign in to comment.