PHP OPcache
To achieve sub-10ms response times, Pragma CMS is architected to leverage PHP OPcache to its fullest extent. By storing precompiled script bytecode in shared memory, the engine eliminates the repetitive overhead of loading and parsing PHP files from the disk on every single request.
Optimized for Production
Pragma CMS heavily utilizes Static Managers and array-based caches. In a production environment, checking the filesystem for code changes is an unnecessary bottleneck.
The Automated Server Script (install_server.sh) natively configures a dedicated override file (99-pragma.ini) to ensure these performance targets are met without manual intervention.
Recommended Configuration
For those performing a Manual Installation, the following settings in your php.ini (or FPM pool configuration) are required to match Pragma's performance benchmarks:
[opcache]
opcache.enable=1
; Allocate sufficient memory for the core and all active extensions
opcache.memory_consumption=256
; Increase the limit of cached files to prevent cache thrashing
opcache.max_accelerated_files=20000
; --- PERFORMANCE TUNING ---
; 0 = Never check for file changes (Maximum speed)
; 1 = Check based on revalidate_freq
opcache.validate_timestamps=1
opcache.revalidate_freq=0
; Ensures that comments are available for internal CMS parsing logic
opcache.save_comments=1
Why this matters
By setting revalidate_freq=0, we tell PHP to check for file changes exactly once per request. While validate_timestamps=0 is technically faster (as it never checks the disk), validate_timestamps=1 with a frequency of 0 is the recommended balance for Pragma CMS: it provides massive speed gains while still allowing the system to detect code updates during a deployment without a hard service restart.
opcache.validate_timestamps=0for absolute maximum performance, any changes uploaded via FTP or SSH will not be visible until you flush the cache. You can do this via the Maintenance Panel in the Admin dashboard or by restarting the PHP-FPM service:
sudo systemctl restart php8.4-fpm