You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@
4
4
5
5
#### Entity driven read-through cache decorator tailored and optimized for event-driven invalidations 🚀
6
6
7
-
This ensures fresh records with real-time update & synchronization support.
7
+
You can think of it as plain cache decorator but with steroids 💊 It ensures fresh records with real-time update & synchronization support by using same old decorator.
8
+
9
+
To understand its mechanics, see [How It Works](#how-it-works) and Check [Why this library?](#why-this-library)
8
10
9
11
> Note: This project is under active development. Use with caution.
Cacheref supports direct integration with SQLAlchemy and Django ORM models. You can pass model classes directly to the `entity` parameter, and cacheref will automatically extract table names and primary keys even composite ones.
163
+
Cacheref doesn’t interact closely with ORM internals by still being able to cache almost any of your query results. Just send model classes as entity to SQLAlchemy or Django ORM and it will extract entity name and primary keys (or composite) without needing extensive integration. This approach helps it remain lightweight and independent of those libraries!
162
164
163
165
> Note:
164
166
> * Pickle is used as default serializer/deserializer. It can be customized
@@ -237,7 +239,7 @@ When an entity changes:
237
239
3. Only those **specific caches/function calls are invalidated**
238
240
239
241
240
-
This means you don't need to remember all the different ways an entity might be cached - just invalidate by entity ID, and all relevant caches are automatically cleared.
242
+
This means you don't need to remember all the different ways an entity might be cached and change your 'read' codebase - just invalidate by entity ID, and all relevant caches are automatically cleared.
241
243
242
244
>❗ To ensure cache consistency across the system, please bear in mind these rules:
243
245
>* Maintain idempotency across all functions using the same cache key (cache key being - function or entity signature)
0 commit comments