On Sun, Nov 25, 2018 at 7:03 AM Marco Pivetta <ocram...@gmail.com> wrote:
> Adding to the pile of "it's an edge case", since the preload scripts will > be procedural, wouldn't it be sufficient to call > `opcache_invalidate(__FILE__)` at the end of them? > > That would actually not do anything useful - as the file will (in all likelihood) never be accessed again anyway. Invalidating a file only ensures it won't be fetched again from the opcache - it doesn't actually free up the space it consumes. Invalidate it or not, in both cases the outcome is the same - a bit of memory consumed by a file that will never again be fetched from the opcache. I believe this is what Dmitry's proposal was about - not putting the file into the opcache to begin with, to save the bit of memory that it would otherwise consume (but I could be wrong, as the savings are likely to be so small I'm not sure why we would care about them...). Zeev