Redis
文章平均质量分 91
andylau223
这个作者很懒,什么都没留下…
展开
-
Redis02-String通用API
String usageSETReturn ValueSyntaxExampleOptionsGETExampleGETRANGEExampleGETSETExampleGETBITSyntaxExampleMGETSyntaxExampleSETEXExampleSETNXExampleSETRANGESyntaxExample SET Redis SET command is used to set some string value in Redis key. Return Value Simple原创 2021-04-08 17:46:09 · 135 阅读 · 0 评论 -
redis通用API
DEL 删除key Redis DEL command is used to delete the existing key in Redis. Syntax 语法 redis 127.0.0.1:6379> DEL KEY_NAME Example 例子 redis 127.0.0.1:6379> SET tutorialspoint redis OK redis 127.0.0.1:6379> DEL tutorialspoint (integer) 1 DUMP 序列化k原创 2021-04-07 18:01:29 · 58 阅读 · 0 评论 -
redis历险-01
5种基础数据结构 string、list、hash、set、zset String 字符串结构使用非常广泛,一个常见的用途就是缓存用户信息。我们将用户信息结构体使用JSON序列化成字符串,然后将序列化后的字符串放进Redis来缓存。 Redis的字符串是动态字符串,是可以修改的字符串,内部结构的实现类似于Java 的 Array List,采用预分配冗余空间的方式来减少内存的频繁分配。 当字符串长度小于1MB时,扩容都是加倍现有的空间。如果字符串长度超过1MB,扩容时一次只会多扩1MB的空间。需要注意的是字原创 2021-04-07 17:26:21 · 78 阅读 · 0 评论