This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

update profile cache TTL to 12 hours

+4 -7
+4 -7
src/modules/atproto/infrastructure/services/CachedBlueskyProfileService.ts
··· 3 3 IProfileService, 4 4 UserProfile, 5 5 } from 'src/modules/cards/domain/services/IProfileService'; 6 - import { Result, ok, err } from 'src/shared/core/Result'; 6 + import { Result, ok } from 'src/shared/core/Result'; 7 7 8 8 export class CachedBlueskyProfileService implements IProfileService { 9 - private readonly CACHE_TTL_SECONDS = 1800; // 30 minutes 9 + private readonly CACHE_TTL_SECONDS = 3600 * 12; // 12 hours 10 10 private readonly CACHE_KEY_PREFIX = 'profile:'; 11 11 12 12 constructor( ··· 38 38 39 39 // Cache miss or parse error - fetch from underlying service 40 40 const result = await this.profileService.getProfile(userId, callerId); 41 - 41 + 42 42 if (result.isOk()) { 43 43 // Cache the successful result 44 44 try { ··· 49 49 ); 50 50 } catch (cacheError) { 51 51 // Log cache error but don't fail the request 52 - console.warn( 53 - `Failed to cache profile for ${userId}:`, 54 - cacheError, 55 - ); 52 + console.warn(`Failed to cache profile for ${userId}:`, cacheError); 56 53 } 57 54 } 58 55