Skip to content

0.2.12

Compare
Choose a tag to compare
@mnapoli mnapoli released this 08 Jun 13:10
· 3550 commits to master since this release
60a5c36

#14: Opcache is now installed and configured

Opcache usually works in memory, compiling PHP code to opcode and caching it in memory between HTTP requests. Since on lambdas the PHP process is terminated between requests, the classic behavior of opcache doesn't work (the cache is cleared every time).

To make opcache work we enable its "file cache" mode where opcache writes the opcode into a file (with the opcache.file_cache option). When the PHP process starts, it reads the opcodes from the file cache.

On the API platform demo, when getting a list of books (uses the database):

  • without opcache: 220ms
  • with opcache: 105ms