fix: get or create cached full customer overwrites previous cache on set
This commit is contained in:
@@ -76,6 +76,15 @@ export const DELETE_FULL_CUSTOMER_CACHE_SCRIPT = readFileSync(
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
/**
|
||||
* Lua script for setting a FullCustomer cache in Redis.
|
||||
* Checks stale-write guard, checks if cache exists, and sets cache atomically.
|
||||
*/
|
||||
export const SET_FULL_CUSTOMER_CACHE_SCRIPT = readFileSync(
|
||||
join(DELETE_CACHE_DIR, "setFullCustomerCache.lua"),
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
/**
|
||||
* Lua script for batch deleting multiple FullCustomer caches from Redis.
|
||||
* For each customer: checks test guard, sets stale-write guard, deletes cache.
|
||||
|
||||
Reference in New Issue
Block a user