lookjapan.COM - IRC ve mIRC dünyasının forumu!

lookjapan.COM - IRC ve mIRC dünyasının forumu! (http://www.lookjapan.com/index.php)
-   XenForo (http://www.lookjapan.com/forumdisplay.php?f=99)
-   -   XenForo'da cache nasıl yapılır? Nasıl aktif edilir? (http://www.lookjapan.com/showthread.php?t=3352)

Anti 26 Mart 2016 11:35

XenForo'da cache nasıl yapılır? Nasıl aktif edilir?
 
XenForo Cache sisteminin nasıl yapıldığını / aktif edildiğini göreceğiz. Yapacağımız işlemler çok basit. İlk önce internal_data klasöründe cache isimli bir klasör oluşturuyoruz ve chmod değerini 777 veriyoruz. Daha sonra library klasöründeki config.php dosyamızı açıyoruz ve en alt satıra şu kodları ekliyoruz;

File Cache için
PHP- Kodu:

$config['cache']['enabled'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['frontend'] = 'Core';
$config['cache']['cacheSessions'] = true;
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backendOptions'] ['cache_dir'] = '/home/siteadı/public_html/internal_data/cache'

Bu cache, File cache için geçerlidir. Bunu yaptığınızda forumunuzun performansı daha da artacaktır. Fakat şu yolu doğru girmelisiniz;


Kod:

/home/siteadı/public_html/internal_data/cache
APC Cache için
PHP- Kodu:

$config['cache']['enabled'] = true;
$config['cache']['backend'] = 'Apc';
$config['cache']['frontend'] = 'Core';
$config['cache']['cacheSessions'] = true;
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backendOptions'] ['cache_dir'] = '/home/siteadı/public_html/internal_data/cache'

Bu cache, APC cache için geçerlidir. Bunu yaptığınızda forumunuzun performansı daha da artacaktır. Fakat şu yolu doğru girmelisiniz;


Kod:

/home/siteadı/public_html/internal_data/cache
xCache için
PHP- Kodu:

$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend'] = 'Xcache';
$config['cache']['backendOptions'] = array(
    
'user' => 'xcachekullanıcıadınız',
    
'password' => 'xcacheşifreniz'
); 

User ve Password yerine xCache admin kullanıcı adı ve şifresini yazıyoruz ve işlemimiz tamamdır.


Memcached Back-End için
PHP- Kodu:

$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    
'compression' => false,
    
'servers' => array(
        array(
            
// your memcached server IP /address
            
'host' => 'localhost',
            
            
// memcached port
            
'port' => 11211,
        )
    )
); 

Cache opsiyonları böyle oluyor. Eğer büyük bir forumunuz varsa, bunları yapmanız mutlaka önerilir. Epey fark edecektir. Ben daima xCache tercih ettiğim için sizlere de xCache öneriyorum ama şu an öyle bir alternatifi olmayanlar File veya APC tercih edebilirler. Özellikle APC çok güzel ve etkili çalışmaktadır.


Makale Yazarı: EfendiBey


All times are GMT +3. The time now is 22:32.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.