Q1) I'm designing a CMS (-who isn't!) but priority is being given to caching. Literally everything is cached. DB rows, DB id queries, Configuration data, processed data, compiled templates. Currently it has two layers of caching.
Tür ilk apc, eAccelerator, xcache veya memcached gibi bir opcode önbellek veya hafıza önbellek olduğunu. Orada bir giriş bulunamadı değilse o zaman ikincil yavaş önbellek aranır, yani php içerir.
Kodu önbelleklerini içinde veri var_export'd dizi ile bir php dosyasına bir require_oncenin yapıyor aslında daha hızlıdır? Benim geliştirme kutusu (XAMPP 5.3) yukarıda belirtilen programlardan birini kurduktan hatalar atma tutar gibi benim testleri sonuçsuz vardır.
Q2) The CMS has numerous helper classes that are autoloaded on demand instead of loading all files. Mostly each has a require before it so no autoloading needs to take place, however this is not the question. Because a page script can have up to 50/60 helper files included I have a feeling that if the site was under pressure it would buckle because of all the i/o that this incurs. Ignore for the moment that there is output cache in place that would remove the need for what I am about to suggest, and also that opcode caches would render this moot. What I have tried to do is join all the helper files required for the scripts execution in one single file. This is achievable and works well, however it has a side effect of greatly increasing the memory usage dramatically even though technically the same code is being used.
Bu konudaki düşünceleriniz ve görüşleriniz nelerdir?