Why does WordPress create two transients with the same name when I specify timeout value?
Working with transients with a timeout, I seem to be getting two transients created, and I don't quite understand why. Looking at the source code on: https://developer.wordpress.org/reference/functions/set_transient/, it would appear this only occurs when wp_using_ext_object_cache() returns false.
My calls are:
set_transient( 'mytransientprefix_key', 'value', 3600);
and then I update the same transient with:
set_transient( 'mytransientprefix_key', 'new_value', 3600);
In the wp_options table, I'm then left with:
One _transient_timeout_mytransientprefix_key (value) and one _transient_mytransientprefix_key (new_value).
What?
Topic transient plugin-development Wordpress
Category Web