zoukankan      html  css  js  c++  java
  • CI reids 缓存

    注意:在项目中的application/libraries 中自己定义的类最好不要以cache命名。

    连接 Redis 服务器的配置信息必须保存到 application/config/redis.php 文件中(没有就新建一个)

    $config['socket_type'] = 'tcp'; //`tcp` or `unix`;
    $config['socket'] = '/var/run/redis.sock'; // in case of `unix` socket type
    $config['host'] = '127.0.0.1';
    $config['password'] = NULL;
    $config['port'] = 6379;
    $config['timeout'] = 0;

    加载redis

    $this->load->driver('cache');
    $this->cache->redis->save('foo', 'bar', 10);
  • 相关阅读:
    C语言第三天,《常量指针和指针常量》
    树莓派系统烧入总结
    c 语言第一天
    7. Vue
    6. Vue
    5. Vue
    4. Vue
    3. Vue
    1. Vue
    2. Vue
  • 原文地址:https://www.cnblogs.com/aajonas/p/5454134.html
Copyright © 2011-2022 走看看