PHP 7.4 OpCache and FatFreeFramework

266 Views Asked by At

I am running a website on a PHP 7.4.12 system with the OpCache enabled. My question: Do I need to tell F3 in the settings to make use 7.4s cache options? If so, how would I do this.

1

There are 1 best solutions below

0
n0nag0n On

So Opcache is a bit of code that stores bits of entire script files into a cache so they can be used later to help speed things up. See the introduction page to opcache. This is not a cache you can store pieces of data you want in there.

OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.

If you're referring to having Fat-Free store certain pieces of data into a cache, then you'll be looking for something like memcached or redis to store those pieces of data. By default though Fat-Free has a file based cache you can use. Here's the documentation in Fat-Free on how to set up some of these things (and another page on the CACHE variable).