| 467 | } |
| 468 | |
| 469 | int checkAlreadyExpired(long long when) { |
| 470 | /* EXPIRE with negative TTL, or EXPIREAT with a timestamp into the past |
| 471 | * should never be executed as a DEL when load the AOF or in the context |
| 472 | * of a slave instance. |
| 473 | * |
| 474 | * Instead we add the already expired key to the database with expire time |
| 475 | * (possibly in the past) and wait for an explicit DEL from the master. */ |
| 476 | return (when <= mstime() && !server.loading && !server.masterhost); |
| 477 | } |
| 478 | |
| 479 | /*----------------------------------------------------------------------------- |
| 480 | * Expires Commands |
no test coverage detected