feat: optimize profile caching mechanism

This commit is contained in:
codytseng
2025-11-02 16:59:05 +08:00
parent 6b22380d26
commit 2ae223b552
4 changed files with 50 additions and 23 deletions

View File

@@ -485,8 +485,14 @@ class IndexedDbService {
}
const stores = [
{ name: StoreNames.PROFILE_EVENTS, expirationTimestamp: Date.now() - 1000 * 60 * 60 * 24 }, // 1 day
{ name: StoreNames.RELAY_LIST_EVENTS, expirationTimestamp: Date.now() - 1000 * 60 * 60 * 24 }, // 1 day
{
name: StoreNames.PROFILE_EVENTS,
expirationTimestamp: Date.now() - 1000 * 60 * 60 * 24 * 30 // 30 day
},
{
name: StoreNames.RELAY_LIST_EVENTS,
expirationTimestamp: Date.now() - 1000 * 60 * 60 * 24 // 1 day
},
{
name: StoreNames.FOLLOW_LIST_EVENTS,
expirationTimestamp: Date.now() - 1000 * 60 * 60 * 24 // 1 day