The list(rows) before paginate is the real trap: pagination only trims what goes out, the whole result set still lands in memory, and the cache keeps a copy. Pushing the page into the query (LIMIT plus a keyset on the order id) and caching per page keeps that line flat. Did you also cap the size of a cached value in Redis, or only fix the query?