Is there any way to guarantee that when I call get_option I will definitely get the value from the database and not from cache?
2 Answers
You could delete an existing cache for your option before you call get_option()
:
$GLOBALS['wp_object_cache']->delete( 'your_option_name', 'options' );
$value = get_option( 'your_option_name' );