title: "Dynamic Page Cache" post_status: publish comment_status: open taxonomy: category: - elementor-developers-docs post_tag: - Hosting - Src - Repos


Dynamic Page Cache

Elementor hosting offers the option to control whether a page should be cached or not, depending on its dynamic nature. By using this hook, you can prevent caching of certain pages that require real-time or dynamic content updates, ensuring that the visitors always see the latest content on those pages.

Hook Details

Hook Arguments

Argument Type Description
allow bool Whether to allow page cache.

Examples

Clear cache for dynamic content updates using the following code:

/**
 * @param bool Whether to allow page cache.
 * @return bool
 */
function custom_page_cache( $allow ) {
    if ( ! $allow ) {
        return $allow;
    }

    return is_my_special_page();
}
add_filter( 'elementor/hosting/page_cache/allow_page_cache', 'custom_page_cache', 20 );