openec2 Article Description

I’m not sure we need this if we have memcached anyway. I’ve added the configurations here in case it helps.

APCU is php caching that may be used in conjunction with memcached.

After installing, reboot your instance, and view https://domain.com/phpinf.php and search for apcu to see it enabled.

Here is how you install it for php8.3:

apt install php8.3-apcu

vi /etc/php/8.3/fpm/conf.d/20-apcu.ini

extension=apcu.so
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 64M. --> i have in /etc/php.ini
apc.optimization = 0
apc.num_files_hint = 4096
apc.ttl = 7200
apc.user_ttl = 7200
apc.gc_ttl = 0
apc.cache_by_default = 1
apc.filters = ""
apc.mmap_file_mask = "/tmp/apc.XXXXXX"
apc.slam_defense = 0
apc.file_update_protection = 2
apc.enable_cli = 0
apc.max_file_size = 10M
apc.stat = 1
apc.write_lock = 1
apc.report_autofilter = 0
apc.include_once_override = 0
;apc.rfc1867 = 0
;apc.rfc1867_prefix = "upload_"
;apc.rfc1867_name = "APC_UPLOAD_PROGRESS"
;apc.rfc1867_freq = 0
apc.localcache = 0
apc.localcache.size = 512
apc.coredump_unmap = 0
apc.stat_ctime = 0


[save and exit]

You can access apcu in the w3tc plugin.