You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
asynccacheProfile(profile: TwitterProfile){constttl=3600;// Set TTL to 1 hour (3600 seconds)awaitthis.runtime.cacheManager.set(`twitter/${profile.username}/profile`,profile,{ ttl });}
But this wil not change the cached stuff.
Worth a look in. Nice catch.
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
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: