Currently the mempool isn't persisted across restarts. The historical argument against doing this is that it would make transactions immortal. Expiration now addresses that issue.

Without preserving the mempool node behavior changes drastically across restarts which complicates production use (e.g. mining overly small/low fee blocks) as well as development testing. The lack of retention also causes the loss of txn priority modifications made with prioritisetransaction which makes the API less reliable.

static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60;
static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111;
static const unsigned int AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL = 24 * 24 * 60;
static const unsigned int AVG_ADDRESS_BROADCAST_INTERVAL = 30;
/** Average delay between trickled inventory transmissions in seconds.
 *  Blocks and whitelisted receivers bypass this, outbound peers get half this delay. */
static const unsigned int INVENTORY_BROADCAST_INTERVAL = 5;
/** Maximum number of inventory items to send per transmission.
 *  Limits the impact of low-fee transaction floods. */
static const unsigned int INVENTORY_BROADCAST_MAX = 7 * INVENTORY_BROADCAST_INTERVAL;
static const unsigned int AVG_FEEFILTER_BROADCAST_INTERVAL = 10 * 60;
static const unsigned int MAX_FEEFILTER_CHANGE_DELAY = 5 * 60;
static const int64_t BLOCK_DOWNLOAD_TIMEOUT_BASE = 1000000;
static const int64_t BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 500000;
static const unsigned int DEFAULT_LIMITFREERELAY = 15;
static const bool DEFAULT_RELAYPRIORITY = true;
static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
static const bool DEFAULT_PERMIT_BAREMULTISIG = true;
static const bool DEFAULT_CHECKPOINTS_ENABLED = true;
static const bool DEFAULT_TXINDEX = false;
static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;
static const bool DEFAULT_TESTSAFEMODE = false;
static const bool DEFAULT_ENABLE_REPLACEMENT = true;
static const bool DEFAULT_FEEFILTER = true;
static const unsigned int MAX_BLOCKS_TO_ANNOUNCE = 8;
static const int MAX_UNCONNECTING_HEADERS = 10;
static const bool DEFAULT_PEERBLOOMFILTERS = true;
struct BlockHasher
{
    size_t operator()(const uint256& hash) const { return hash.GetCheapHash(); }