-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: client-twitter - character card profiles are cached into database indefinitely #1638
Labels
bug
Something isn't working
Comments
We can Modify the async cacheProfile(profile: TwitterProfile) {
const ttl = 3600; // Set TTL to 1 hour (3600 seconds)
await this.runtime.cacheManager.set(
`twitter/${profile.username}/profile`,
profile,
{ ttl }
);
} But this wil not change the cached stuff. |
My preference is to remove the caching code altogether. It's not necessary
for performance and is confusing for the end user.
…On Fri, Jan 3, 2025, 11:29 AM AIFlow_ML ***@***.***> wrote:
We can Modify the cacheProfile function to include an expiration time.
This can be done by adding an additional parameter to the set method that
specifies the time-to-live (TTL) for the cache entry. For example:
async cacheProfile(profile: TwitterProfile) {
const ttl = 3600; // Set TTL to 1 hour (3600 seconds)
await this.runtime.cacheManager.set(
`twitter/${profile.username}/profile`,
profile,
{ ttl }
);}
But this wil not change the cached stuff.
Worth a look in. Nice catch.
—
Reply to this email directly, view it on GitHub
<#1638 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE32LKNHLQTZBYMCI4GVWB32IX72LAVCNFSM6AAAAABUOX6ZUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRYGY2TANBVGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
augchan42
added a commit
to augchan42/eliza
that referenced
this issue
Jan 4, 2025
odilitime
added a commit
that referenced
this issue
Jan 5, 2025
fix: remove twitter profile caching (#1638)
This issue can be closed now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should not be caching character card into the database indefinitely
Around line 725 in base.ts:
That means once the profile is cached, even if the character card info is changed and agent process is restarted, the cached profile from the database is used. This should be removed so that character card bios can be updated upon restart. There's not much of a performance gain from caching anyway, as the bio is only loaded once on startup.
twitter login Cookies are also cached indefinitely, not sure if that's good or bad, but it doesn't seem right to me as twitter login cookies should eventually expire.
The text was updated successfully, but these errors were encountered: