зеркало из
https://github.com/iharh/notes.git
synced 2025-10-30 05:06:05 +02:00
93 строки
2.6 KiB
Plaintext
93 строки
2.6 KiB
Plaintext
????
|
|
https://squidex.jugru.team/api/assets/srm/3221c203-b174-4f0f-bbf2-2fcc15a59813/artem-artemsev.pdf
|
|
2024
|
|
SuchkovTech - Redis for 20 min of 23:21
|
|
https://www.youtube.com/watch?v=QpBaA6B1U90
|
|
! iredis
|
|
set firstKey "Hello"
|
|
get firstKey
|
|
(nil)
|
|
del firstKey
|
|
set num 1
|
|
incrby num num 3
|
|
(integer) 4
|
|
lpush cars Toyota
|
|
(integer) 1
|
|
lpush cars BMW
|
|
(integer) 2
|
|
rpush cars KIA
|
|
(integer) 3
|
|
lrange cars 0 -1 # all the list
|
|
1) "BMW"
|
|
2) "Toyota"
|
|
3) "KIA"
|
|
lpop cars
|
|
"BMW"
|
|
llen cars
|
|
(integer) 2
|
|
lpush sold Mersedes LEFT LEFT
|
|
lmove cars sold # from, to
|
|
...
|
|
! hset iphone brand Apple model "iPhone X" memory 64 color black
|
|
! hget iphone model
|
|
! "iPhone X"
|
|
! hmget iphone memory color wrongField
|
|
! 1) "64"
|
|
! 2) black
|
|
! 3) (nil)
|
|
! hgetall iphone
|
|
! 1) "brand"
|
|
! "Apple"
|
|
! 2) "model"
|
|
! ...
|
|
! hincrby iphone memory 64
|
|
! (integer) 128
|
|
! keys *
|
|
! 1) firstKey
|
|
! ...
|
|
! 3) iphone
|
|
! ...
|
|
! ttl cars
|
|
! (integer) -1 # not-limited
|
|
! expire cars 10
|
|
...
|
|
! ttl cars
|
|
! (integer) -2 # deleted
|
|
! exists cars
|
|
! (integer) 0 # no data by this case
|
|
! setex vars 20 10 # with ttl 10 (with suffix ex)
|
|
!
|
|
! 18:30
|
|
public ArticleInfo getCachedArticle(Long id) {
|
|
try (Jedis jedis = jedisPool.getResource()) {
|
|
String key = "article:%d".formatted(id);
|
|
String raw = jedis.get(key);
|
|
if (raw != null) {
|
|
return mapper.readValue(raw, ArticleInfo.class);
|
|
}
|
|
var article = getArticle(id); // from DB
|
|
if (article == null) {
|
|
return null;
|
|
}
|
|
jedis.setex(key, TTL, mapper.writeValueAsString(article));
|
|
return article;
|
|
}
|
|
}
|
|
|
|
2023
|
|
SpringIO - Vector Similarity Search in Spring with Redis Stack by Brian Sam-Bodden 0:00 of 54:35
|
|
https://www.youtube.com/watch?v=0lT4vu6Kmxw
|
|
https://2023.springio.net/docs/slides/vector-similarity-search-in-spring-with-redis-stack-springio23.pdf
|
|
I've been using Redis wrong this whole time of 20:52
|
|
https://www.youtube.com/watch?v=WQ61RL1GpEE
|
|
redis-dli -a $REDIS_PWD
|
|
> KEYS *
|
|
> SET powerlevel 9001
|
|
! 1-st - RDB, snapshotting
|
|
! 2-nd - AOF - append only file (similar to WAL)
|
|
2021
|
|
DailyCodeBuffer - Redis CLI Tutorial | Complete Course 0:00 of 1:27:11
|
|
https://www.youtube.com/watch?v=0wqZd3zwh7Y
|
|
????
|
|
https://www.youtube.com/shorts/x8lcdDbKZto
|