Title: Using object cache causes redirect loop
Last modified: June 13, 2025

---

# Using object cache causes redirect loop

 *  Resolved [jakethesnake3p0](https://wordpress.org/support/users/jakethesnake3p0/)
 * (@jakethesnake3p0)
 * [12 months ago](https://wordpress.org/support/topic/using-object-cache-causes-redirect-loop/)
 * Enabling the object cache (either with memcached or redis) produces a redirect
   issue. It’s most obvious in the login page (page never loads), but also in wp-
   cli; when executing “wp plugin list”, the following appears before any output:
 *     ```wp-block-code
       Warning: Some code is trying to do a URL redirect. Backtrace:#0 /home/sprucewo/apps/staging/wp-includes/class-wp-hook.php(326): WP_CLI\Utils\wp_redirect_handler('https://staging...')#1 /home/sprucewo/apps/staging/wp-includes/plugin.php(205): WP_Hook->apply_filters('https://staging...', Array)#2 /home/sprucewo/apps/staging/wp-includes/pluggable.php(1411): apply_filters('wp_redirect', 'https://staging...', 302)#3 /home/sprucewo/apps/staging/wp-includes/pluggable.php(1560): wp_redirect('https://staging...', 302, 'WordPress')#4 /home/sprucewo/apps/staging/wp-content/plugins/aperitif-core/inc/core-dashboard/core-dashboard.php(115): wp_safe_redirect('https://staging...')#5 /home/sprucewo/apps/staging/wp-includes/class-wp-hook.php(324): AperitifCoreDashboard->page_welcome_redirect('')#6 /home/sprucewo/apps/staging/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)#7 /home/sprucewo/apps/staging/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#8 /home/sprucewo/apps/staging/wp-content/plugins/aperitif-core/aperitif-core.php(34): do_action('aperitif_core_a...')#9 /home/sprucewo/apps/staging/wp-content/plugins/aperitif-core/aperitif-core.php(39): AperitifCore->__construct()#10 /home/sprucewo/apps/staging/wp-content/plugins/aperitif-core/aperitif-core.php(139): AperitifCore::get_instance()#11 /home/sprucewo/apps/staging/wp-includes/class-wp-hook.php(324): aperitif_core_instantiate_plugin('')#12 /home/sprucewo/apps/staging/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)#13 /home/sprucewo/apps/staging/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#14 /home/sprucewo/apps/staging/wp-content/plugins/qode-framework/class-qodeframework.php(57): do_action('qode_framework_...')#15 /home/sprucewo/apps/staging/wp-includes/class-wp-hook.php(324): QodeFramework->init_framework_root('')#16 /home/sprucewo/apps/staging/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)#17 /home/sprucewo/apps/staging/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#18 /home/sprucewo/apps/staging/wp-settings.php(578): do_action('plugins_loaded')#19 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1375): require('/home/sprucewo/...')#20 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1294): WP_CLI\Runner->load_wordpress()#21 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()#22 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))#23 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()#24 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('phar:///usr/loc...')#25 /usr/local/bin/wp(4): include('phar:///usr/loc...')
       ```
   
 * Disabling object cache removes the redirect issue. What’s even more odd is that
   when I went into the W3TC settings and disabled the object cache > save settings,
   it redirected me to the “Aperifit theme” settings page. It seems like a conflict
   with this theme (I can’t just disable/remove the theme)…

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [11 months, 4 weeks ago](https://wordpress.org/support/topic/using-object-cache-causes-redirect-loop/#post-18514663)
 * Hello [@jakethesnake3p0](https://wordpress.org/support/users/jakethesnake3p0/)
 * Thank you for reaching out and I am happy to help!
   Thank you for providing the
   information, and can you please share if there are any optimization settings 
   int the menioned theme settings?Also, is there a chance you can temporarely switch
   to some other theme and see if the issue persists?
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Using object cache causes redirect loop’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [object-cache](https://wordpress.org/support/topic-tag/object-cache/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [11 months, 4 weeks ago](https://wordpress.org/support/topic/using-object-cache-causes-redirect-loop/#post-18514663)
 * Status: resolved