![](https://img-blog.csdnimg.cn/20200619101943413.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Redis
https://redis.io/
morningcat2018
情深不寿,慧极必伤
展开
-
公司里使用的分布式锁实现方案-基于redis
import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.data.redis.core.RedisTemplate;import org.springframework.stereotype.Compone...原创 2020-04-28 14:51:12 · 60 阅读 · 0 评论 -
基于 redis 的分布 id 生成器
package new_package.id;import redis.clients.jedis.Jedis;import redis.clients.jedis.JedisPool;import redis.clients.jedis.JedisPoolConfig;import java.io.IOException;import java.time.LocalDateTime;/** * @describe: 类描述信息 * @author: morningcat.zhang原创 2020-05-12 13:40:08 · 220 阅读 · 0 评论 -
关于实时排名系统设计的一点资料
自己设计排名系统的实现代码redis使用 redis 的 SortedSet 数据结构;https://redis.io/commands#sorted_sethttp://redisdoc.com/sorted_set/index.htmlhttp://www.redis.cn/commands.html#sorted_setjava客户端 jedis@Service@Slf4j...原创 2019-09-06 14:06:06 · 1126 阅读 · 0 评论 -
redis 分布式锁的使用
Redisson 使用package morning.cat.redis.redisson;import org.junit.BeforeClass;import org.junit.Test;import org.redisson.Redisson;import org.redisson.api.RLock;import org.redisson.config.Config;im...原创 2019-09-06 14:30:21 · 119 阅读 · 0 评论 -
使用CLion调试redis源码
CLion调试redis源码github仓库转载 2019-12-09 10:31:35 · 1261 阅读 · 0 评论 -
转载:面试前必须要知道的Redis面试题
转载:面试前必须要知道的Redis面试题原文地址今天来分享一下Redis几道常见的面试题:如何解决缓存雪崩?如何解决缓存穿透?如何保证缓存与数据库双写时一致的问题?一、缓存雪崩1.1什么是缓存雪崩?回顾一下我们为什么要用缓存(Redis):提高性能,缓存(一般是指内存)查询速度比数据库查询速度快提高并发性能,请求分流,提高并发现在有个问题,如果我们的缓存挂掉了,这意味...转载 2019-05-06 20:42:23 · 92 阅读 · 0 评论 -
redis cli 基本命令
strings : valus is stringhashes : value is hashmaplists : value is 双向链表sets : value is 无序集合sorted set : value is 有序集合参考:https://my.oschina.net/mengzhang6/blog/2875820stringsetSET key value [EX seconds|PX milliseconds] [NX|XX] [KEEPTTL]作用设置.原创 2020-05-11 15:28:11 · 684 阅读 · 0 评论 -
Redis 驱逐策略 梳理总结
Redis 驱逐策略 梳理总结redis 内存容量64 位系统,默认没有内存限制32 位系统,3GB 的隐式内存限制redis.conf 进行动态配置将 maxmemory 设置为 0 将导致没有内存限制# Set a memory usage limit to the specified amount of bytes.# When the memory limit ...原创 2020-04-02 20:28:07 · 439 阅读 · 0 评论 -
Redis Eviction policies (驱逐策略)
Using Redis as an LRU cacheLRU Least Recently Used 即最近最少使用将Redis用作缓存时,通常很方便的做法是在添加新数据时自动将旧数据逐出。此行为在开发人员社区中是众所周知的,因为它是流行的内存缓存系统的默认行为。LRU 实际上只是支持的驱逐方法之一。此页面涵盖了 Redis maxmemory 指令更加一般的主题,该指令用于将内存使用限制为...翻译 2020-04-01 00:17:21 · 1627 阅读 · 0 评论 -
redis 学习笔记梳理
最近学习redis的一些笔记https://github.com/morningcat2018/redis-study-notes使用jedis写的一些samplehttps://github.com/mengzhang6/jedis-demo原创 2019-04-10 22:46:18 · 100 阅读 · 0 评论