LLMS_Cache_Helper
LifterLMS Caching Helper
Description Description
Source Source
File: includes/class.llms.cache.helper.php
class LLMS_Cache_Helper { /** * Constructor * @since 3.15.0 * @version 3.15.0 */ public function __construct() { add_action( 'wp', array( $this, 'maybe_no_cache' ) ); } /** * Define nocache constants and set nocache headers on specified pages * Checkout & Student Dashboard * @return void * @since 3.15.0 * @version 3.15.0 */ public function maybe_no_cache() { if ( ! is_blog_installed() ) { return; } $ids = apply_filters( 'llms_no_cache_page_ids', array( llms_get_page_id( 'checkout' ), llms_get_page_id( 'myaccount' ), ) ); if ( is_page( $ids ) ) { llms_maybe_define_constant( 'DONOTCACHEPAGE', true ); llms_maybe_define_constant( 'DONOTCACHEOBJECT', true ); llms_maybe_define_constant( 'DONOTCACHEDB', true ); nocache_headers(); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.15.0 | Introduced. |
Methods Methods
- __construct — Constructor
- maybe_no_cache — Define nocache constants and set nocache headers on specified pages Checkout & Student Dashboard