redis / redis-doc

Redis documentation source code for markdown and metadata files, conversion scripts, and so forth
Other
2.31k stars 1.72k forks source link

COPY should clarify expiry handling #2196

Open jimmymic opened 2 years ago

jimmymic commented 2 years ago

Reading this documentation page: https://redis.io/commands/copy/

Does the COPY command persist the current expiry that has been set on a key?

Would be useful to clarify the documentation.

itamarhaber commented 2 years ago

Hello @jimmymic,

You've raised an excellent point - thanks!

The implementation of COPY, according to the source code, indeed copies the TTL.

Would you care to submit the PR that adds this to the documentation?