Need more insight on caching when pagination is involved in PHP Coding Help Posted April 21, 2015 · Edited April 21, 2015 by mouseywings Well if you can't do it at that level then you'll have to either use the lookup method mentioned before or refactor it before storing in the txt file db thing you're using! A txt file, how are you parsing that? Is that optimal??? Well right now in my method, I'm grabbing ALL results (from a cache) and then paginating those results. If I cache during the pull, wouldn't I have to do like Page 1 cache, Page 2 cache and end up storing like 50 cache results per topic if it were to hit 50 pages? That would be an insane amount of caches per topic when I could just do one. That's why I was trying to keep it that way. I just dislike how I have to flush the entire cache and recache the entire topic posts if just one post was edited or liked.