Skip to content

Commit 0f5b462

Browse files
author
Hai Zheng
committed
v7.9-a14: Escalated WP disable OC cache func notifier to resolve network OC failure 500 error.
1 parent d50dca5 commit 0f5b462

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/object-cache.cls.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@
1212

1313
require_once dirname( __DIR__ ) . '/autoload.php';
1414

15+
if ( ! function_exists( 'litespeed_oc_disable_ext_cache' ) ) {
16+
/**
17+
* Disable external object cache flag.
18+
*
19+
* When called, WP's own set_transient/get_transient will use wp_options
20+
* table instead of the (unavailable) OC backend.
21+
*
22+
* @since 7.8.0.1
23+
* @access public
24+
*/
25+
function litespeed_oc_disable_ext_cache() {
26+
wp_using_ext_object_cache( false );
27+
}
28+
}
29+
1530
/**
1631
* Object cache handler using Redis or Memcached.
1732
*

src/object.lib.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@ function litespeed_exception_handler( $errno, $errstr, $errfile, $errline ) {
2727
}
2828
}
2929

30-
if ( ! function_exists( 'litespeed_oc_disable_ext_cache' ) ) {
31-
/**
32-
* Disable external object cache flag.
33-
*
34-
* When called, WP's own set_transient/get_transient will use wp_options
35-
* table instead of the (unavailable) OC backend.
36-
*
37-
* @since 7.8.0.1
38-
* @access public
39-
*/
40-
function litespeed_oc_disable_ext_cache() {
41-
wp_using_ext_object_cache( false );
42-
}
43-
}
44-
4530
require_once __DIR__ . '/object-cache.cls.php';
4631
require_once __DIR__ . '/object-cache-wp.cls.php';
4732

0 commit comments

Comments
 (0)