thinkphp5redis缓存新增方法实例讲解
网络编程 2021-07-04 23:06www.168986.cn编程入门
这篇文章主要介绍了thinkphp5redis缓存新增方法实例讲解,redis是项目中最常用的缓存,有正在使用的同学可以看下
找到该文件
thinkphp/library/think/cache/driver/Redis.php
进行新增方法
在这里 我就举例几个 如何添加 添加的方法查看 redis教程
/** * 返回列表中指定区间内的元素 * */ public function lrange($key,$start,$end){ return $this->handler->lrange($key,$start,$end); } /** * 在list左边新增元素 * */ public function lpush($key,$value){ return $this->handler->lPush($key,$value); } /** * 在list右边新增元素 * */ public function rpush($key,$value){ return $this->handler->rPush($key,$value); } /** * 返回并移除列表中的第一个元素 * */ public function lpop($key){ return $this->handler->lPop($key); } /** * 返回并移除列表的最后一个元素。 * */ public function rpop($key){ return $this->handler->rPop($key); }
如果还需要添加其他的方法 根据手册某个方法以及传值
去修改$this->handler-> 后面的方法函数
到此这篇关于thinkphp5redis缓存新增方法的文章就介绍到这了,更多相关thinkphp5 redis缓存新增方法内容请搜索狼蚁SEO以前的文章或继续浏览狼蚁网站SEO优化的相关文章希望大家以后多多支持狼蚁SEO!
编程语言
- 机械手焊接机器人编程 机械手焊接设备编程
- vb数据库编程实例,vb做数据库
- tiobe世界编程语言排行榜,全球编程语言排行
- 成都java编程培训 成都it编程培训中心
- 编程基础培训,编程基础知识培训
- flash游戏编程基础教程,flash游戏开发教程
- 不会英语能学编程吗 不会英语可以学程序员吗
- 爱心代码编程C语言 爱心代码编程c语言公式
- c语言编程学习入门 c语言编程快速入门
- 西门子plc编程培训 西门子plc编程培训班
- 哪里可以学编程 台州哪里可以学编程
- 少儿编程哪个好 少儿编程哪个品牌好
- 编程是什么意思,图形编程是什么意思
- c语言编程软件下载,c语言编程软件在哪下载
- java编程软件下载,java编程下载手机版
- ug编程培训学校,ug编程培训教程