Support » Plugin: Redis Object Cache » 302 Redirect loop

  • Resolved Gulshan Kumar


    My plugin does redirect upon activation –

    register_activation_hook(__FILE__, 'example_plugin_activate');
    add_action('admin_init', 'example_plugin_redirect');
    function example_plugin_activate() {
    	add_option('example_plugin_do_activation_redirect', true);
    function example_plugin_redirect() {
    	if (get_option('example_plugin_do_activation_redirect', false)) {
    		if(!isset($_GET['activate-multi'])) {
     // This is path where I faced redirect loop
    			wp_redirect(admin_url( 'options-general.php?page=example' ));

    I use Redis where this example plugin is active.

    In a rare instance, I have noticed 302 redirect loop

    This was fixed when…
    1) I deactivated my example plugin
    2) and flushed Redis cache.
    3) tried activation, got redirected to settings page as expected.
    4) I was able to repro this problem only where I use Redis, not at any non-Redis site. Means, normally it works in 99% cases.

    Any ideas? Does Redis purge its cache upon any plugin activation?


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.