MasterPress 1.3.1 is a compatibility release for PHP 8 and WordPress 5.7. It still remains backwards compatible with older PHP versions.
An more concise API terminology for the WordPress Transients API to retrieve OR store a value in a transient for a given amount of time.
If a value is not provided in the second argument, this method will get the value of the transient of the given name (if any).
If a value is provided in the second argument, this method will set the value of the transient against the given name.
The name of the cached item to check for
Mixed $value = null
The value to store, if any. If this value is not provided, it is assumed you’re trying to retrieve it.
Integer $expires = 600
For setting a value only. Either an integer number of seconds to store the transient, or a string describing the time period, as parsed by the WOOF::seconds function (see related methods).
Boolean $json = false
If true, the value will be encoded to JSON if being stored, or decoded from JSON if being retrieved.