PHP 7 Cache options
For example I have 2 sites.
1. One that is php 7 where the data never changes.
2. php 7 site where the data constantly changes.
Using cPanel Version 76.0 (build 8) -
What are my best options for caching? The sites are different accounts. I figured I could change something in php.ini I have read a lot about the op and mem. But can't seem to find a page dumb down enough so I may understand. Yes i have spent about 6 hours googling but I think I am not searching the correct words. Any pointers thoughts or help is appreciated. Thanks
I have this in .htaccess file -
# this is for cache expiration
ExpiresActive On
# Default directive this might be all ExpiresDefault "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/javascript "access plus 1 year"
-
Whilst not specific to PHP, but Apache (it's all relevant in the name of performance tuning), have you looked at mod_deflate (aka "Optimize Website" in the cPanel UI)? There's documentation at: Optimize Website - Version 76 Documentation - cPanel Documentation For PHP itself, consider zlib output compression (inside MultiPHP INI Editor): [quote]Whether to transparently compress pages. If this option is set to "On" in php.ini or the Apache configuration, pages are compressed if the browser sends an "Accept-Encoding: gzip" or "deflate" header.
MultiPHP INI Editor for cPanel - Version 76 Documentation - cPanel Documentation As for OPcache, more information can be found at the link below (make sure to read the warnings!): PHP Options - EasyApache 4 - cPanel Documentation0 -
Thank you. I did forget to mention that I do use - Optimize Website in cpanel. I am going to give zlib output compression a try then too. thank you. 0 -
Hi @webstuff On top of the suggestions provided by @ES - George there are a number of threads that address caching options that might be useful to look at. Here are a few: At the very least it may give you some idea of common issues + configurations. Thanks! 0
Please sign in to leave a comment.
Comments
3 comments