background picture of the home page

And if we

Redis 持久化篇 - 数据持久化

持久化介绍 redis 是一个内存型数据库,DRAM 的特性之一就是掉电数据丢失,所以如何保存数据就成了Redis 问世之初就需要考虑的问题,如何保存数据用专业的说法就是数据持久化. Redis目前有两种持久化策略,RDB(redis datebase backup),AOF(append only

thumbnail of the cover of the post

算法日记 - 贪心

LC 455.分发饼干:https://leetcode.cn/problems/assign-cookies/ 455. 分发饼干 - 力扣(LeetCode) class Solution { public: int findContentChildren(vector<int>& g,

thumbnail of the cover of the post

算法日记 - 回溯

LC 77. 组合 77. 组合 - 力扣(LeetCode) class Solution { public: vector<vector<int>> combine(int n, int k) { std::vector<int> tRes; vector

thumbnail of the cover of the post

Redis 学习笔记 XI -- Ojbect's TTL and refcount

1. 过期时间是什么 在redis 中是一个k-v 的失效时间点。设定由过期时间的key 在TTL 衰减到0时这个kv对会被redis回收 2. 为什么要过期时间 如果不设置过期时间,且数据也不是什么常驻数据,那么当这个kv失效后仍驻留在内存里,如果不手动DEL 这个kv对就会一值占用内存资源,对于

thumbnail of the cover of the post