Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter savvyharry

    (@savvyharry)

    sorry, forgot to mention…

    should matter but I would like to do this for “Page caching via memcached”

    marcuslayton

    (@marcuslayton)

    we are also looking for this functionality – let me know what you have figured out

    marcuslayton

    (@marcuslayton)

    we ended up modifying the lib\w3\PgCache.php file – right at the top of the file

    function _get_page_key($request_uri, $mobile_group = '', $referrer_group = '',
            $encryption = false, $compression = false, $content_type = false) {
            // replace fragment
            $key = preg_replace('~#.*$~', '', $request_uri);
    
    // WE ADDED THIS
    // replace query string
    $key = preg_replace('~\?.*$~', '', $key);

    obviously it we’ll have to do it every update – and your implementation is a touch different

    would be nice to get that added in as a feature

    Thread Starter savvyharry

    (@savvyharry)

    hi marcuslayton,

    it seems you have got it working ?? so the final mod looks like version 1 below?

    function _get_page_key($request_uri, $mobile_group = '', $referrer_group = '',
            $encryption = false, $compression = false, $content_type = false) {
    
            $key = preg_replace('~\?.*$~', '', $key);

    or would it look like verision 2 below?

    function _get_page_key($request_uri, $mobile_group = '', $referrer_group = '',
            $encryption = false, $compression = false, $content_type = false) {
    
            $key = preg_replace('~#.*$~', '', $request_uri);
            $key = preg_replace('~\?.*$~', '', $key);

    1) with your modification, does this REMOVE the query string entirely?

    2) or does it simply ignore the query string now and serve the cached page regardless?

    3)

    implementation is a touch

    if you don’t mind me asking, how are you guys using it? can you give some suggestion so that it would work for my purpose as well?

    thanks for your help!

    Its currently not possible. But its version 2 they are using.
    And it removes the query for all modes not just disc enchanced.

    thanks andreas – i missed responding to this

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    There will be hooks available for addressing cases like this in the next release.

    ahh – excellent – thanks frederick! dang love the plugin

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: W3 Total Cache] varying query string variables wildcard’ is closed to new replies.