---
title: "Comment by Vic Moreno on \"Managed Services Won't Save You From Your Own Code\" | Hashnode"
description: "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. Pu"
url: "https://hashnode.com/posts/managed-services-won-t-save-you-from-your-own-code/6af750b29f0a9eb118bc7fd0/comment/6af979e4fa6bf7041d0d0c75"
---

[Discussion](https://hashnode.com/posts/managed-services-won-t-save-you-from-your-own-code/6af750b29f0a9eb118bc7fd0)

Comment [Managed Services Won't Save You From Your Own Code](https://hashnode.com/posts/managed-services-won-t-save-you-from-your-own-code/6af750b29f0a9eb118bc7fd0)

[Vic Moreno](https://hashnode.com/@itsvicmoreno)

[4h ago](https://hashnode.com/posts/managed-services-won-t-save-you-from-your-own-code/6af750b29f0a9eb118bc7fd0/comment/6af979e4fa6bf7041d0d0c75)

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?
