Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
litespeed_wiki:cache:lscwp:esi_nonce [2017/09/25 12:49] Hai Zheng |
litespeed_wiki:cache:lscwp:esi_nonce [2017/10/01 17:58] Hai Zheng |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Note: LiteSpeed WordPress Cache plugin needs to be v1.2.4+. | + | Note: LiteSpeed WordPress Cache plugin needs to be v1.3+. |
Let's take ** WPBakery Page Builder Version 5.3 ** as an example. It used WordPress nonce in frontend. So once it got cached, the nonce will fail to pass validation once expired. With ESI, it can be made to a private/public cache separate from full page. | Let's take ** WPBakery Page Builder Version 5.3 ** as an example. It used WordPress nonce in frontend. So once it got cached, the nonce will fail to pass validation once expired. With ESI, it can be made to a private/public cache separate from full page. | ||
Line 17: | Line 17: | ||
if ( ! $from_esi && ! vc_is_frontend_editor() ) { | if ( ! $from_esi && ! vc_is_frontend_editor() ) { | ||
if ( method_exists( 'LiteSpeed_Cache_API', 'esi_enabled' ) && LiteSpeed_Cache_API::esi_enabled() ) { | if ( method_exists( 'LiteSpeed_Cache_API', 'esi_enabled' ) && LiteSpeed_Cache_API::esi_enabled() ) { | ||
- | if ( method_exists( 'LiteSpeed_Cache_API', 'v' ) && LiteSpeed_Cache_API::v( '1.2.4' ) ) { | + | if ( method_exists( 'LiteSpeed_Cache_API', 'v' ) && LiteSpeed_Cache_API::v( '1.3' ) ) { |
$params = array( 'data' => $data ) ; | $params = array( 'data' => $data ) ; | ||
return LiteSpeed_Cache_API::esi_url( 'js_composer', 'WPBakery Page Builder', $params, 'default', true ) ;// The last parameter is to remove ESI comment wrapper | return LiteSpeed_Cache_API::esi_url( 'js_composer', 'WPBakery Page Builder', $params, 'default', true ) ;// The last parameter is to remove ESI comment wrapper |