Skip to content

feat(core): add write expires support#7615

Open
officialasishkumar wants to merge 2 commits into
apache:mainfrom
officialasishkumar:feat/write-expires
Open

feat(core): add write expires support#7615
officialasishkumar wants to merge 2 commits into
apache:mainfrom
officialasishkumar:feat/write-expires

Conversation

@officialasishkumar
Copy link
Copy Markdown

@officialasishkumar officialasishkumar commented May 25, 2026

Which issue does this PR close?

Closes #5623.

Rationale for this change

Cache-oriented services can apply default TTLs today, but callers cannot choose an expiration for an individual write. Exposing this through write options lets callers set a per-object lifetime when the backend supports native expiry.

What changes are included in this PR?

  • Add write_with_expires capability and WriteOptions::expires plumbing through OpWrite.
  • Add .expires(Duration) builders for write and writer futures.
  • Reject expires writes on unsupported services in the correctness layer.
  • Apply per-write expiration in Redis and Memcached writers, taking precedence over default TTL.
  • Keep existing Java, Python, and Node.js write option conversions defaulting expires to unset.
  • Add behavior coverage for expiring writes.

Are there any user-facing changes?

Users can call write_with(...).expires(Duration) and writer_with(...).expires(Duration) on services that report write_with_expires.

AI Usage Statement

Not applicable.

Add a write_with_expires capability and plumb per-write expiration through WriteOptions and OpWrite.

Implement per-write expiration for Redis and Memcached, and cover unsupported capability checks plus behavior tests for expiring writes.
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Expires support for OpenDAL

1 participant