by rand()clause in the SQL statement, we'll always get the results in the same order if we execute the query multiple times. This is because the results were stored in the cache, and the query is not actually running, we're just getting the same results the cache system got in the first run.
Because the cached results will expire after 1 minute because we set the TTL to
CACHE_TTL_1_MINUTE, the result order will change if we execute the query when a minute has passed from the first execution, and they will remain in the same order for 1 more minute.
Remember that, for security reasons, prepared queries are the recommended way of querying the database, specially when you're using data coming from untrusted sources in your query.