Skip to content

fix(api): apply default cache expiry to posted vcons#162

Open
howethomas wants to merge 1 commit into
merge/refactor-with-testsfrom
bug/default-api-expiry-fallback
Open

fix(api): apply default cache expiry to posted vcons#162
howethomas wants to merge 1 commit into
merge/refactor-with-testsfrom
bug/default-api-expiry-fallback

Conversation

@howethomas
Copy link
Copy Markdown
Contributor

Summary

  • apply the default VCON_REDIS_EXPIRY TTL when vCons are created via POST /vcon and POST /vcon/external-ingress
  • centralize Redis cache writes behind a shared helper so API writes and storage rehydration use the same expiry behavior
  • update the POST expiry regression tests to assert the documented cache behavior

Test plan

  • uv run pytest common/tests/test_post_vcon_expiry.py common/tests/test_api_branches.py -q
  • python -m py_compile api/api.py common/tests/test_post_vcon_expiry.py common/tests/test_api_branches.py

Made with Cursor

Prevent API-created vCons from persisting indefinitely in Redis when no chain sets an explicit expiration. Update the POST expiry regression tests to match the documented cache behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@howethomas howethomas linked an issue May 11, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redis memory leak caused by missing chain configurations

1 participant