@@ -46,7 +46,7 @@ To understand its mechanics, see [How It Works](#how-it-works) and Check [Why th
4646
4747## Features
4848
49- - 🔑 ** Smart Invalidation** : Instantly clears all function caches tied to an entity’s footprint
49+ - 🔑 ** Smart Invalidation** : Instantly clears all unique function call caches tied to an entity’s footprint
5050- 📋 ** Custom ID Fields** : Support for entities with non-standard/composite ID field names
5151- 🔒 ** Custom Backend** : Custom backend support with Built-in Redis/Memory backends
5252- 🔄 ** Cross-Service Compatible** : Designed to play nice across services with traditional and simple payloads
@@ -292,16 +292,16 @@ get_user_from_auth(1)
292292# In service B
293293UserEntity = " user"
294294@cache (entity = UserEntity)
295- def get_filtered_user ( some_user_filter ): # Completely different function
296- # id is 1 as a result of filter
297- return {" id" : 1 , " name" : " Sam Jones" }
295+ def get_filtered_users ( user_ids ): # Completely different function, but same logical entities
296+
297+ return [ {" id" : user_ids[ 0 ] , " name" : " Sam Jones" }, { " id " : user_ids[ 2 ], " name " : " Another Sam Jones " }]
298298
299- get_filtered_user({ ' name ' : ' Sam Jones ' } )
299+ get_filtered_user([ 1 , 2 ] )
300300
301301# In any of your services
302302
303303# Given that your key_prefix is same everywhere,
304- # it will invalidate all function calls in your platform where it returned user with ID of 1.
304+ # it will invalidate * all* function calls in your platform where it returned user with ID of 1.
305305# see @cache.invalidates for more
306306cache.invalidate(" user" , 1 )
307307
0 commit comments