Redis error




Wordpress LScache Plugin: Redis error

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello! My debug.log is full of these messages: PHP Warning: Redis::setex() expects parameter 2 to be int, string given in /var/www/public/zlata-studio.com.ua/wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 481 $res = $this->_conn->setEx( $key, $ttl, $data ) Ive debugged it and it seems $ttl is equal to et_get_main-menu. My theme has following lines: function et_get_main_menu( $menu_id = main-menu, $class = ) $custom_menu_slug = custom_nav $cache_slug = et_get_ . $menu_id if($menu_id == main-menu-right) $custom_menu_slug = custom_nav_right $custom_menu = etheme_get_custom_field( $custom_menu_slug ) $one_page_menu = if(etheme_get_custom_field(one_page)) $one_page_menu = one-page-menu if(!empty($custom_menu) && $custom_menu != ) $output = false $output = wp_cache_get( $class, $custom_menu, $cache_slug ) How could I fix this issue? This topic was modified 2 years ago by guess4me. This topic was modified 2 years ago by guess4me. In your code snippet I didnt see any wp_cache_set used. Can you paste the full error warning which can tell the full original file path that caused error, and the related snippet in your original file? function et_get_main_menu( $menu_id = main-menu, $class = ) $custom_menu_slug = custom_nav $cache_slug = et_get_ . $menu_id if($menu_id == main-menu-right) $custom_menu_slug = custom_nav_right $custom_menu = etheme_get_custom_field( $custom_menu_slug ) $one_page_menu = if(etheme_get_custom_field(one_page)) $one_page_menu = one-page-menu if(!empty($custom_menu) && $custom_menu != ) $output = false $output = wp_cache_get( $class, $custom_menu, $cache_slug ) if ( !$output ) ob_start() wp_nav_menu(array( menu => $custom_menu, before => , container_class => menu-main-container . $one_page_menu . $class, after => , link_before => , link_after => , depth => 10, fallback_cb => false, walker => new Et_Navigation )) $output = ob_get_contents() ob_end_clean() wp_cache_add( $class, $custom_menu, $output, $cache_slug ) echo $output return Expand Yeah, it seems wp_cache_add uses wrong arguments. I think you have already had the answer. Better to ask ET dev. Thanks. @guess4me is it your theme from 8theme? o Woopress Theme? I have similar issue. Best regards, @svenms Yes, it is. Find lines like wp_cache_get( $class, $menu_id, $cache_slug ) at theme-functions.php & change it to wp_cache_get( $class _ $menu_id , $cache_slug )



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference