zoukankan      html  css  js  c++  java
  • 微擎开启redis memcache

    微擎开启redis memcache

    版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/luogan129/article/details/79114116

    config.php

    微擎如何开启memcache

     工作随笔  deam  2年前 (2016-08-17)  5319℃  0评论

    如何安装memcache,我这边就不说了,网上教程应该一大把。

    当服务器已经安装memcache之后,打开微擎的配置文件(./data/config.php):

    1、修改 $config[‘setting’][‘cache’]的值为:memcache;

    2、增加(如果在配置文件里有这两个,就将其相应的值修改一下):

    $config[‘setting’][‘memcache’][‘server’] = ‘127.0.0.1’;//安装有memcache的服务器地址
    $config[‘setting’][‘memcache’][‘port’] = ‘11211’;//memcache端口,默认为11211

    然后保存后你会发现微擎后台性能优化那边已经显示memcache开启了!




    // -------------------------- CONFIG SETTING --------------------------- // $config['setting']['charset'] = 'utf-8'; $config['setting']['cache'] = 'redis'; $config['setting']['timezone'] = 'Asia/Shanghai';
    • 1
    • 2
    • 3
    • 4
    // --------------------------  CONFIG MEMCACHE  --------------------------- //
    $config['setting']['memcache']['server'] = '127.0.0.1';
    $config['setting']['memcache']['port'] = 11211;
    $config['setting']['memcache']['pconnect'] = 1;
    $config['setting']['memcache']['timeout'] = 30;
    $config['setting']['memcache']['session'] = 1;
    
    // --------------------------  CONFIG REDIS  --------------------------- //
    $config['setting']['redis']['server'] = '127.0.0.1';//如果redis服务器在别的机器,请填写机器的IP地址。
    $config['setting']['redis']['port'] = 6379;
    $config['setting']['redis']['pconnect'] = 0;
    $config['setting']['redis']['timeout'] = 1;
    $config['setting']['redis']['requirepass'] = '';
  • 相关阅读:
    python 环境常用指令(updating...)
    English Voice of <<Take Me To Your Heart>>
    English trip V2-B 1 What's on the Menu? 菜单上有什么? Teacher:Tom
    VM-ESXI 相关常用命令(Updateing)
    English trip EM2- LP 5B Eating Right 正确的饮食 Teacher:Gabi
    (转)Linux中的screen命令使用
    Centos7 密码遗忘-单用户模式
    数据集
    SVD 实现
    网易音乐推荐原理及算法
  • 原文地址:https://www.cnblogs.com/westsoft/p/9934241.html
Copyright © 2011-2022 走看看