Comments (3)
Thanks for the report. Unfortunately this isn’t an easy fix if I understand the issue correctly.
The pydantic classes need a serializer and a deserializable (to return them back to their original classes from string cache).
You can always write your own custom serializer/deserializer. You just need to create a custom function that seeializes to a dict and then calls dump. Then you can pass that new function to this library. Remember you also have to implement a deserializer as well.
Another option is using the pickle option, but make sure you understand the security risks.
Does that not work in this case?
from python-redis-cache.
Thanks for the report. Unfortunately this isn’t an easy fix if I understand the issue correctly.
The pydantic classes need a serializer and a deserializable (to return them back to their original classes from string cache).
You can always write your own custom serializer/deserializer. You just need to create a custom function that seeializes to a dict and then calls dump. Then you can pass that new function to this library. Remember you also have to implement a deserializer as well.
Another option is using the pickle option, but make sure you understand the security risks.
Does that not work in this case?
Makes sense, I have started to use the pickle approach. Thanks for maintaining this library!
from python-redis-cache.
This issue is stale because it has been open for 30 days with no activity.
from python-redis-cache.
Related Issues (18)
- Unable to use the package HOT 2
- Write commands not allowed after non deterministic commands HOT 2
- If I want to pause the caching (while debugging) what is the best way to accomplish that? HOT 4
- Use __qualname__ instead of __name__ for the namespace HOT 4
- Ability to ignore provided function results HOT 3
- Add ability to invalidate items corresponding to a value of one or more args HOT 2
- Pass caching when redis server goes down during execution HOT 6
- Error "EVALSHA - all keys must map to the same key slot" when work with redis cluster HOT 2
- update pypi package HOT 1
- Extra curly braces in redis key HOT 6
- Upgrading to v3 breaks when using redis cluster HOT 2
- Option to disable the cache & Default TTL HOT 3
- LUA Cache fn purpose HOT 3
- How to use cache decorator inside class method HOT 8
- Library tries to import inexisting "django.utils.six" module HOT 2
- Update documentation or setup.py for Python >3.8 HOT 1
- Support custom cache key generation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-redis-cache.