We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40385
    • 75 Posts
    Hey guys,

    (1) I'm having some trouble understanding the Wayfinder "&cacheResults" parameter. Is there any (and if yes, what?) difference
    in these two wayfinder calls?

    [[Wayfinder ? &cacheResults=`1` &cacheTime=`0`]]


    [[Wayfinder]]


    My understanding is that in both cases wayfinder is called cached and will be cached until the cache is cleared manually.

    (2) Does the cacheResults parameter overwrites the modx caching behavior? Meaning when &cacheResults parameter is set it doesn't make any difference if Wayfinder call itself is called cached or uncached? E.g.

    [[!Wayfinder ? &cacheResults=`1` &cacheTime=`3600`]] //although called uncached, stores results for 3600 seconds


    [[Wayfinder ? &cacheResults=`1` &cacheTime=`3600`]] //althoug called cached, stores results for 3600 seconds


    Thanks in advance for clarification



    [ed. note: paul_kemp last edited this post 13 years, 5 months ago.]
      • 22303 MODX Staff
      • 10,725 Posts
      I believe cacheResults is only useful if you must call Wayfinder uncached. In that case, it caches results based on user, request params, properties, etc. IOW, it is for caching unique results for uncached calls to Wayfinder, until the Resource cache is refreshed/cleared.
        • 40385
        • 75 Posts
        Thanks for the quick answer & clarification!