alpha
Login
or
Join now
nandi.uk
/
semble
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
update profile cache TTL to 12 hours
author
Wesley Finck
date
9 months ago
(Oct 29, 2025, 4:44 PM -0700)
commit
54881ec1
54881ec1daab59d4a78cb038c206f2f48afb78ad
parent
7c3fa0fd
7c3fa0fd9edd18af01506ebe07edceb05e18fd36
+4
-7
1 changed file
Expand all
Collapse all
Unified
Split
src
modules
atproto
infrastructure
services
CachedBlueskyProfileService.ts
+4
-7
src/modules/atproto/infrastructure/services/CachedBlueskyProfileService.ts
View file
Reviewed
···
3
3
IProfileService,
4
4
UserProfile,
5
5
} from 'src/modules/cards/domain/services/IProfileService';
6
6
-
import { Result, ok, err } from 'src/shared/core/Result';
6
6
+
import { Result, ok } from 'src/shared/core/Result';
7
7
8
8
export class CachedBlueskyProfileService implements IProfileService {
9
9
-
private readonly CACHE_TTL_SECONDS = 1800; // 30 minutes
9
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
-
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
52
-
console.warn(
53
53
-
`Failed to cache profile for ${userId}:`,
54
54
-
cacheError,
55
55
-
);
52
52
+
console.warn(`Failed to cache profile for ${userId}:`, cacheError);
56
53
}
57
54
}
58
55