Challenge 1 — Solution Task: Explain in your own words the difference between what OPcache caches and what an application-level cache (like Redis) caches, using a concrete example of each kind of content being cached. OPcache caches the COMPILED FORM of PHP source code itself - the "opcodes" PHP's engine produces after parsing a .php file, but before actually running it. A concrete example: if Post.php contains the find() method's own source code, OPcache stores the already-compiled version of that exact source code in shared memory, so the next request doesn't have to re-parse and re-compile Post.php from scratch - it just runs the already-compiled opcodes directly. This has nothing to do with what the code actually DOES when it runs, or what data it produces. An application-level cache (like Redis) caches the RESULT of running that code - the actual data an expensive operation produced. A concrete example: the result of $pdo->query("SELECT * FROM posts ORDER BY views DESC LIMIT 10")->fetchAll() - the specific rows returned by that specific query, right now, for this specific data - stored so the next request can skip re-running that query entirely and just read the already-fetched rows back out of Redis. The key distinction: OPcache would still need to run (fetch, decode, etc.) every single time even with OPcache fully enabled, since OPcache only skips re-COMPILING the PHP source code - it never skips actually EXECUTING it. An application cache is what lets a request skip executing that expensive database query altogether, by serving an already-computed result instead. Notes: - If the underlying posts table changed (a new popular post appeared), OPcache would have no idea and no reason to care - the compiled code for getPopularPosts() itself hasn't changed at all. Only the application-level cache entry would need to be invalidated/refreshed to reflect that change, exactly matching the chapter's own "cache invalidation" warning. - This distinction is exactly why the chapter's own warn-box calls out "OPcache caches compiled code, never your application's data" as a genuinely common confusion - the two caching layers solve completely different problems and require completely different (and unrelated) invalidation strategies.