Last active
August 29, 2015 14:01
-
-
Save rom3r4/c270ad1425721de6c3c3 to your computer and use it in GitHub Desktop.
Drupal 7 Memcached, Memcache, settings.php, cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/php5/conf.d/memcache.ini | |
extension=memcache.so | |
memcache.hash_strategy="consistent" | |
sudo nano /etc/memcached.conf | |
# Change this default value to ~ 1/4 of your total available RAM | |
-m 16 | |
sudo /etc/init.d/memcached restart | |
sudo /etc/init.d/apache2 restart | |
sudo netstat -tap | grep memcached | |
tcp 0 0 localhost:11211 *:* LISTEN 25266/memcached | |
<?php | |
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc'; | |
$conf['cache_default_class'] = 'MemCacheDrupal'; | |
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache'; | |
?> | |
multi-site: | |
add: | |
<?php | |
$conf['memcache_key_prefix'] = 'unique_key'; | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment