search

Home  >  Q&A  >  body text

如果redis没有设置expire,他是否默认永不过期?

如果redis没有设置expire,他是否默认永不过期?

过去多啦不再A梦过去多啦不再A梦2761 days ago1075

reply all(5)I'll reply

  • 大家讲道理

    大家讲道理2017-04-24 16:01:40

    Yes,it is

    reply
    0
  • PHPz

    PHPz2017-04-24 16:01:40

    The answer to this question is relatively simple, let me answer it in one sentence.
    Normally it won’t expire, but I’m not sure if the memory is full.

    reply
    0
  • PHPz

    PHPz2017-04-24 16:01:40

    Don’t be misled, if the actual memory exceeds the maximum memory you set, the LRU deletion mechanism will be used.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-24 16:01:40

    It will not be deleted
    If the validity period is not set, even if the memory is used up, the redis automatic recycling mechanism will depend on the validity period set, and will not touch the items without a validity period. If the memory is still full after cleaning, it will no longer accept write operations

    reply
    0
  • 高洛峰

    高洛峰2017-04-24 16:01:40

    Not deleted, just moved from memory to disk.
    redis is more than just an in-memory database

    reply
    0
  • Cancelreply