I found some configuration options in qa-confing.php file to optimize Q2A site performance. I understand little how it works but don't know how to implement properly it on the Q2A site.
1. QA_CACHE_DIRECTORY
I have configured my qa-cache folder in the qa-confing.php file like this:
define('QA_CACHE_DIRECTORY', '/home/u310886959/domains/mydomain.com/public_html/qa-cache');
And it is working for me when I am enabling it from Admin/Caching - (FileSystem), I show the comment there "For maximum security, it's STRONGLY recommended to place the folder outside of the webroot (so they can never be accessed via a web browser)".
Question: Where should I put my qa-cache folder? (look my path above)
2. QA_COOKIE_DOMAIN
Many times I get speed improvement tips from page speed testing tools like "GTmetrix, Pingdom" to serve static resources from a cookie-free domain.
Question 1: Can I configure the "QA_COOKIE_DOMAIN" option to archive what speed testing tools asking to do? If "Yes",
Question 2: How to set up a cookie-free domain for the Q2A site?
I know if I want to set up a cookie-free domain then I have to create a subdomain like static.mydomain.com and then I have to put my static resources there.
Question 3: Which Q2A installation folders are static and I have to move them from mydomain.com to static.mydomain.com and how to link their path to work Q2A site?
I am currently using Cloudflare CDN. Is there anything to change with Cloudflare after moving static resources to static.mydomain.com?
3. QA_OPTIMIZE_DISTANT_DB
My site is currently on shared hosting and I think my Q2A installation & database are running on the same server. There is only 2 thing to configure, set it to "true" or "false".
Question 1: Should I set it to "true"?
Question 2: How it works?
A very long question asked but I know it will definitely help many Q2A users to optimize their site. (If properly set up)