Prevent caching of user-specific pages
No guarantee, but it should help with some cache plugins.
This commit is contained in:
parent
e0d4430d40
commit
e0bf599995
@ -18,6 +18,13 @@ if ( ! is_user_logged_in() && ! get_option( 'fictioneer_enable_public_cache_comp
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Try to prevent caching of the page
|
||||||
|
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
|
||||||
|
define( 'DONOTCACHEPAGE', true );
|
||||||
|
}
|
||||||
|
|
||||||
|
do_action( 'litespeed_control_set_nocache', 'nocache due to user-specific page.' );
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
$current_tab = sanitize_key( $_GET['tab'] ?? '' );
|
$current_tab = sanitize_key( $_GET['tab'] ?? '' );
|
||||||
$order = fictioneer_sanitize_query_var( $_GET['order'] ?? 0, ['desc', 'asc'], 'desc' );
|
$order = fictioneer_sanitize_query_var( $_GET['order'] ?? 0, ['desc', 'asc'], 'desc' );
|
||||||
|
@ -18,6 +18,13 @@ if ( ! is_user_logged_in() || get_option( 'fictioneer_enable_public_cache_compat
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Try to prevent caching of the page
|
||||||
|
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
|
||||||
|
define( 'DONOTCACHEPAGE', true );
|
||||||
|
}
|
||||||
|
|
||||||
|
do_action( 'litespeed_control_set_nocache', 'nocache due to user-specific page.' );
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
$user = wp_get_current_user();
|
$user = wp_get_current_user();
|
||||||
$current_tab = sanitize_key( $_GET['tab'] ?? '' );
|
$current_tab = sanitize_key( $_GET['tab'] ?? '' );
|
||||||
|
@ -33,6 +33,13 @@ if ( ! is_user_logged_in() ) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Try to prevent caching of the page
|
||||||
|
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
|
||||||
|
define( 'DONOTCACHEPAGE', true );
|
||||||
|
}
|
||||||
|
|
||||||
|
do_action( 'litespeed_control_set_nocache', 'nocache due to user-specific page.' );
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
$post_id = get_the_ID();
|
$post_id = get_the_ID();
|
||||||
$current_user = wp_get_current_user();
|
$current_user = wp_get_current_user();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user