You probably want to look at using WordPress Transients as they can handle both the data and the timestamp/expiration.
You can also check out The Deal with WordPress Transients by CSS Tricks which has some good info as well.
You probably want to look at using WordPress Transients as they can handle both the data and the timestamp/expiration.
You can also check out The Deal with WordPress Transients by CSS Tricks which has some good info as well.