Quick Answer
Opcache stores compiled bytecode in a shared memory segment (SHM). Workers read from shared memory directly with no file I/O. Resetting Opcache (opcache_reset()) invalidates all cached scripts - every worker reloads from disk on next request causing a performance spike. In production, use rolling deploys with fresh workers instead of resetting. opcache.validate_timestamps=0 prevents file-change checks.
Answer
Opcache stores precompiled opcodes in shared memory. Resetting clears the cache, forcing recompilation of all scripts, causing CPU spikes and latency. Production systems avoid frequent resets except during deployments.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.
PHP interview questions and answers for beginner, junior, mid-level, senior, and expert developers. Ideal for freshers and experienced candidates preparing for PHP roles.