Skip to content

Commit 0f46dc7

Browse files
authored
Merge pull request #824 from palsp/fix/twitter-cache-timestamp
fix: twitter cache expires
2 parents 7c93797 + 8e4be2a commit 0f46dc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/client-twitter/src/base.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -617,15 +617,15 @@ export class ClientBase extends EventEmitter {
617617
await this.runtime.cacheManager.set(
618618
`twitter/${this.profile.username}/timeline`,
619619
timeline,
620-
{ expires: 10 * 1000 }
620+
{ expires: Date.now() + 10 * 1000 }
621621
);
622622
}
623623

624624
async cacheMentions(mentions: Tweet[]) {
625625
await this.runtime.cacheManager.set(
626626
`twitter/${this.profile.username}/mentions`,
627627
mentions,
628-
{ expires: 10 * 1000 }
628+
{ expires: Date.now() + 10 * 1000 }
629629
);
630630
}
631631

0 commit comments

Comments
 (0)