📜  get_transient wordpress - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:20.076000             🧑  作者: Mango

代码示例1
// Save the API response so we don't have to call again until tomorrow.
set_transient( 'css_t_subscribers', $data, DAY_IN_SECONDS );

// Do we have this information in our transients already?
$transient = get_transient( 'css_t_subscribers' );
  
// Do things...

refrence:
https://css-tricks.com/the-deal-with-wordpress-transients/