Skip to content

Commit 992e455

Browse files
authored
Merge pull request #5 from Styria-Digital/hotfix/cache_recursion_avoid
Hotfix/cache recursion avoid
2 parents 8653b37 + 38c60e9 commit 992e455

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Available additional settings that can be set to `UNICORN` dict in settings.py w
2525

2626
## Customization changelog
2727

28+
### 0.60.0.2 - (2024-07-16)
29+
30+
- Avoid recursion upon caching parent/child complex components with `pickle.dumps`
31+
2832
### 0.60.0.1 - (2024-03-29)
2933

3034
- No customizations, just sync with main package.

django_unicorn/cacher.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def __enter__(self):
7777
raise UnicornCacheError(
7878
f"Cannot cache component '{type(component)}' because it is not picklable: {type(e)}: {e}"
7979
) from e
80+
except RecursionError as e:
81+
logger.warning(
82+
f"Cannot cache component '{type(component)}' because it is not picklable: {type(e)}: {e}"
83+
)
8084

8185
return self
8286

0 commit comments

Comments
 (0)