Developers can set the expire time (also known as theĀ time to live) on keys stored on a Redis server. This is a useful tool when data is only valid for a certain period of time. Periodically (every 100 ms) Redis performs a sampling of its dataset and deletes a percentage of the keys that are determined to have expired.