The Transients API provides a standardized way to store data temporarily (with an expiration time) in the database.
After the expiration time, the entry will be invalidated and the transient will be deleted from the transient store. (Source)
Using Transients API:
Further reading: Ryan points out that Transients are a type of cache, not data storage as you can read in this blogpost.