WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
WP Super Cache - GET parameter and file cache (2 posts)

  1. b.l.k
    Member
    Posted 1 year ago #

    Hello,

    it seems that the option Don’t cache pages with GET parameters. (?x=y at the end of a url) is not used when cache is stored or served.

    Should the following lines be added ?

    In wp-cache-phase1.php
    line 179 :

    if (
    	(
    	$wp_cache_request_uri == $wp_cache_home_path ||
    	( $wp_cache_slash_check && substr( $wp_cache_request_uri, -1 ) == '/' ) ||
    	( $wp_cache_slash_check == 0 && substr( $wp_cache_request_uri, -1 ) != '/' )
    	) &&
    	( wp_cache_get_cookies_values() == '' &&
    	( empty( $_GET ) || !$wp_cache_no_cache_for_get ) &&
    	$serving_supercache ) )
    	{

    instead of

    if (
    	(
    	$wp_cache_request_uri == $wp_cache_home_path ||
    	( $wp_cache_slash_check && substr( $wp_cache_request_uri, -1 ) == '/' ) ||
    	( $wp_cache_slash_check == 0 && substr( $wp_cache_request_uri, -1 ) != '/' )
    	) &&
    	( wp_cache_get_cookies_values() == '' && empty( $_GET ) && $serving_supercache ) )
    {

    In wp-cache-phase2.php
    line 72 :
    if ( $wp_cache_no_cache_for_get && !empty( $_GET ) ) {
    instead of
    if ( !empty( $_GET ) ) {

    line 393 :

    global $wp_cache_no_cache_for_get;
    
    if( ($wp_cache_no_cache_for_get && !empty( $_GET )) || is_feed() || ( $super_cache_enabled == true && is_dir( substr( $supercachedir, 0, -1 ) . '.disabled' ) ) ) {

    instead of
    if( !empty( $_GET ) || is_feed() || ( $super_cache_enabled == true && is_dir( substr( $supercachedir, 0, -1 ) . '.disabled' ) ) ) {

    Thank you for your answer :)

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    Those aren't needed. Have you tried using the debug log with a GET parameter? It works on my sites when I try it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic