1. Currently, keyIsExpired doesn't consider the flag, affecting KEYS and WATCH - we should probably check the flag inside keyIsExpired instead of expireIfNeeded
  2. hashTypeGetValue doesn't consider the flag, returning GETF_EXPIRED instead of GETF_OK

Comment From: Jam804

@guybe7 It's been two weeks since this issue was created. If you haven't started, do you mind if I work on it?

Comment From: sundb

@guybe7 I want to know why it affects KEYS and WATCH? keyIsExpired() only determines whether it has expired, but it doesn't remove the key from db, right?

Comment From: guybe7

@sundb right, but when allow_access_expired is on we want KEYS to show logically-expired keys

Comment From: Jam804

@sundb I agree that server.allow_access_expired=1 should make the keys command return expired keys, but since expireIfNeeded triggers deletions, scanning many expired keys could cause performance problems. Therefore, I've modified the implementation accordingly.