Skip to content
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

Introduce cache clear mechanism for AppInfo storage #3197

Open
shuuji3 opened this issue Feb 8, 2025 · 1 comment
Open

Introduce cache clear mechanism for AppInfo storage #3197

shuuji3 opened this issue Feb 8, 2025 · 1 comment
Labels
c: bug Something isn't working s: on hold Blocked by something or frozen to avoid conflicts

Comments

@shuuji3
Copy link
Member

shuuji3 commented Feb 8, 2025

We need the TTL cache or other way to clear cache for AppInfo storage to solve the permanent cache issue that locks out all users in the server with certain conditions (ref. #2279 #2562 #2422).

For TTL, Elk uses unstorage as a storage interface and has several storage drivers (memory, cloudflare, vercel, fs), but only a few drivers support TTL functionality.

Maybe we need to implement our own TTL functionality with the package like @isaacs/ttlcache or need to wait for updates from upstream unstorage.

@shuuji3 shuuji3 added the c: bug Something isn't working label Feb 8, 2025
@shuuji3 shuuji3 added s: on hold Blocked by something or frozen to avoid conflicts and removed s: on hold Blocked by something or frozen to avoid conflicts labels Feb 25, 2025
@shuuji3
Copy link
Member Author

shuuji3 commented Mar 3, 2025

The first one (generic TTL feature for some drivers) was implemented by #3193. But the upstream memory driver PR is still waiting to be reviewed.

If I understand correctly, now AppInfo will be cleared from the TTL-supported storage driver after 1 week, and the memory driver will still hold the cache forever. But it's a volatile memory driver so it should be cleared when a new instance is created, so a new deployment or server restart will also clear the AppInfo cache now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working s: on hold Blocked by something or frozen to avoid conflicts
Projects
None yet
Development

No branches or pull requests

1 participant