Skip to content

Commit f4da4dd

Browse files
committed
WIP
1 parent b3d6db8 commit f4da4dd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

redis/paymentCache.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export async function * getUserUncachedAddresses (userId: string): AsyncGenerato
3333
export const getPaymentList = async (userId: string): Promise<Payment[]> => {
3434
const uncachedAddressStream = getUserUncachedAddresses(userId)
3535
for await (const address of uncachedAddressStream) {
36+
console.log('[CACHE]: Creating cache for uncached address', address.address)
3637
void await CacheSet.addressCreation(address)
3738
}
3839
return await getCachedPaymentsForUser(userId)
@@ -283,6 +284,7 @@ export const clearRecentAddressCache = async (addressString: string, timestamps:
283284
export const initPaymentCache = async (address: Address): Promise<boolean> => {
284285
const cachedKeys = await getCachedWeekKeysForAddress(address.address)
285286
if (cachedKeys.length === 0) {
287+
console.log('[CACHE]: Initializing cache for address', address.address)
286288
await CacheSet.addressCreation(address)
287289
return true
288290
}

0 commit comments

Comments
 (0)