Why does not limit getResources?

Good day! Please help me with Modx.

On one page I use two calls to getResources to display news:

<div class="news-box">
 [[getResources? &parents=`5` &tpl=`tpl-main-news` &includeTVs=`1` &limit='6']]
</div>
<div class="main-comments">
 <h3 class="main-comments__heading">Random news</h3>
 <ul class="comments-list">
 [[getResources? &parents=`5` &tpl=`tpl-main-news-random` &includeTVs=`1` &limit='3' &sortby=`RAND()`]]
</ul>
</div>


The second call getResources duplicate ignoring your limit first. Displays 6 posts.
How to fix? Tell me!
April 7th 20 at 15:41
1 answer
April 7th 20 at 15:43
Solution
First, the figure needs to take into backticks:
&limit=`3` instead of &limit='3'
Secondly, it is better in your case to try to display snippets uncached (with an exclamation mark after the second opening bracket: [[!getResources]])

Find more questions by tags MODX