1

I am trying to select 3 random entries from a few channels. I have:

{exp:channel:entries limit="3" channel="X|Y|Z" status="open" orderby="random" disable="categories|category_fields|member_data|pagination" dynamic="no" cache="no"}

    ....

{/exp:channel:entries}

The issue I have is that the same 3 entries continue to be displayed, in varying order. I assume the query must be cached somewhere? I can't figure it out though.

I do have memcached enabled for EE, and I think this is where the issue lies. If I disable caching, every refresh of the page actually displays 3 random items.

Is there a way to prevent EE from caching this query? In my 'Template Manager', this particular template has "No" for "Enable Caching?"

1
  • try {exp:channel:entries limit="3" channel="X|Y|Z" status="open" orderby="random" disable="categories|category_fields|member_data|pagination" dynamic="no" cache="no" random} – Max Lazar Sep 14 '15 at 17:18
2

So it looks like I have to disable "Cache Dynamic Channel Queries?" in Admin->Channel Administration->Global Channel Preferences

For random ordering to function properly

1
  • If this is the correct answer for your initial question please mark it as answer. – BNetz Feb 23 '19 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.