Skip to content

Conversation

@abrookins
Copy link
Collaborator

This PR adds support for LangCache supports item-specific TTLs. We also begin using quote() and unquote() to manage the variety of characters that can disrupt queries that use attributes.

Copilot AI review requested due to automatic review settings November 25, 2025 23:50
Copilot finished reviewing on behalf of abrookins November 25, 2025 23:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for item-specific TTLs to the LangCache semantic cache implementation and replaces custom fullwidth character encoding with standard URL percent-encoding for attribute values. The changes enable per-entry TTL overrides and improve the handling of special characters in attribute values.

Key changes:

  • Added per-entry TTL support by converting seconds to milliseconds for the LangCache API
  • Replaced custom fullwidth character encoding with URL percent-encoding (quote/unquote) for attribute values
  • Updated unit and integration tests to verify TTL functionality and encoding behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
redisvl/extensions/cache/llm/langcache.py Implements TTL conversion to milliseconds, removes custom encoding functions, uses quote/unquote for attributes
tests/unit/test_langcache_semantic_cache.py Adds unit tests for per-entry TTL, updates attribute encoding test expectations, improves import error test
tests/integration/test_langcache_semantic_cache_integration.py Adds integration tests for TTL expiration behavior, updates encoding comments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings November 25, 2025 23:54
Copilot finished reviewing on behalf of abrookins November 25, 2025 23:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Collaborator

@rbs333 rbs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

4 participants