We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23166
    • 7 Posts
    I use 3 getPage requests on the same page to get the content from 1 migx-tv. I need different parts from the migx content on different positions. This is 1 of the 3 getPage request:

    	
    	[[!getPage?
    	&elementClass=`modSnippet` 
    	&element=`getImageList`
    	&tvname=`references`
    	&tpl=`REFERENCES-item`
    	&limit=`9`
    	&includeTVs=`1`
    	&includeContent=`1`
    	&showHidden=`0`
    	&sortby=`menuindex`
    	&sortdir=`DESC`
    	&depth=`0` 
    	&processTVs=`1`
    	&tvPrefix=``
    	&pageNavTpl=`[[$NAV-PAGE_nav]]`
    	&pageActiveTpl=`[[$NAV-PAGE_active]]`
    	&pagePrevTpl=`[[$NAV-PAGE_prev]]`
    	&pageNextTpl=`[[$NAV-PAGE_next]]`
    	&pageFirstTpl=`[[$NAV-PAGE_first]]`
    	&pageLastTpl=`[[$NAV-PAGE_last]]`
    	&pageVarKey=`projekte`
    	]]
    


    The page is now really slow. If i use just one request, the page gets faster. GetPage should not be cached, but i think, that is makes the site slower. Is that right? Is there a solution to make the site faster?

    This question has been answered by absent42. See the first response.

    • discuss.answer
      • 42046
      • 436 Posts
      Do you need to load all the TVs and process them?

      You can limit the TVs to ones specifically needed with &includeTVList and &processTVList. This can give quite a speed boost.

      Also you can cache getPage and give each call a specific cache key with &cache=`1` and &cache_key=`nameofcachekey`
        • 23166
        • 7 Posts
        Hi Dan! I changed &includeTVList and &processTVList, without any changes for the loading time.
        The solution was to add &cache=`1` and (different?) !!!&cache_key=`nameofcachekey`, now the site is really fast. I just tried it with &cache=`1`, but this had broken the site.

        Thanks for your fast and great help!
          • 42046
          • 436 Posts
          In regard to the TVs, how many do the child resources contain and how many are actually used in the in what getResources displays?

          And yes, you need to specify a different cache key for each instance of getPage on a page, otherwise it will use the same cache for every call.
            • 23166
            • 7 Posts
            At first, i use getPage with MIGX. 1 MIGX entry contains 14 TVs. On the site are 23 MIGX entries, which i paginate with getPage. Request 1 and 2 containing just 3 TVs, the third one containing all TVs for rendering. Hope this helps.
              • 42046
              • 436 Posts
              You should gain some extra speed limiting the &includeTVList to just the needed 3. And also do try turning off processTVs (at least limit with &processTVList), it's often not necessary to process a lot of TV types.