• Resolved nestor_ps

    (@nestor_ps)


    Hi,
    I have a custom url with add_rewrite_url and custom query_vars. Total Cache does not cache the url’s. Is it normal? Is there any way to indicate Total cache to cache this url’s?

    add_rewrite_rule("heritageobject/([^/]*)$",
    'index.php?coeli_endpoint=heritageobject&coeli_slug=$matches[1]',
    'top'
    );

    add_filter( 'query_vars', function ( $query_vars ) {
    $query_vars[] = 'coeli_endpoint';
    $query_vars[] = 'coeli_slug';

    return $query_vars;
    } );

    function fitxa_redirect( $template ) {


    if ( get_query_var( 'coeli_slug' ) ) {


    $endpoint = strtolower( coeli_get_endpoint_from_custom_slug( strtolower( get_query_var( "coeli_endpoint" ) ) ) );
    $custom_template = COELI_PATH . 'templates/record.php';

    return $custom_template;

    }

    return $template;
    }

    thanks in advance

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nestor_ps

    Thank you for reaching out and I am happy to help!

    Can you please share which caching method you are using for the Page Caching?
    Thanks!

    Thread Starter nestor_ps

    (@nestor_ps)

    Hi, I got disk enhanced but the option Cache?URIs with query string variables was disabled.

    I’ve changed to disk basic and now I can select Cache?URIs with query string variables.

    After browsing server cache folder I’ve seen the cached file in the random folder. I think it’s working but I dont see the comment by Total Cache at the end of the page source with cache stats. Is it normal?

    thanks

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nestor_ps

    Thank you for your feedback.
    By default, caching query strings is not available with the Disk: Enhanced caching method. However, you can add the specific queries to be cached by adding them to the Performance>Page Cache>Advanced>Accepted query strings: field.
    As for the W3TC comment, if you are using HTML Minify the comments may be stripped. If the Minification process is done by the W3TC please add Performance to Performance>Minify>HTML & XML>Ignored comment stems: field, save all settings and purge the cache.

    I hope this helps!

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.