Spring boot not connect to redis docker container

I’m trying to connect a Spring Boot application on a instance of redis in my docker, I have configure the host localhost and port 16379, but something strange happens, the cache works, but when i see the redis keys are empty, o think that the Spring boot is using a embeded redis instance. My pom.xml… Read More Spring boot not connect to redis docker container

Got Invalid argument type error when connect to redis container

I’m playing with docker and redis and I want to start redis from the official docker image: docker run -p 6379:6379 redis 1:C 02 Oct 2022 08:11:14.410 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 02 Oct 2022 08:11:14.410 # Redis version=7.0.5, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 02 Oct 2022 08:11:14.410 # Warning: no… Read More Got Invalid argument type error when connect to redis container

There is a very strange question,Unable to pass parameters to function。

import redis _redis = redis.StrictRedis(host=’localhost’, port=6379, db=0) print(_redis.expire(‘test’, 3,nx=True)) Cannot pass parameter nx report Error redis.exceptions.ResponseError: wrong number of arguments for ‘expire’ command this is function def expire( self, name: KeyT, time: ExpiryT, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False, ) -> ResponseT: """ Set an… Read More There is a very strange question,Unable to pass parameters to function。

BGSAVE in Redis

How does the BGSAVE configuration work in Redis? If the config file has he following line: save 60 1000 Does this mean the snapshot will be saved every 60 seconds? Or does it mean snapshot will be saved after ever 1000 writes? Or can it be either? In a book at I am reading, it… Read More BGSAVE in Redis

Redis XADD: ERR Invalid stream ID specified as stream command argument

Why am I getting this error for xadd. Redis: 6.2 127.0.0.1:6379> xadd hello 1658902141-* key val (error) ERR Invalid stream ID specified as stream command argument 127.0.0.1:6379> xadd hello 1658902141000-* key val (error) ERR Invalid stream ID specified as stream command argument 127.0.0.1:6379> XADD mystream 1526919030474-* message " World!" (error) ERR Invalid stream ID specified… Read More Redis XADD: ERR Invalid stream ID specified as stream command argument

Redis get function

I’m getting github repo data, and then i store it in redis with set. with get am getting current data, but when i trying add function to get it’s not working. let redisClient; (async () => { redisClient = redis.createClient(); redisClient.on("error", (error) => console.error(`Error : ${error}`)); redisClient.on("connect", function () { console.log("Redis Connected!"); }); await redisClient.connect();… Read More Redis get function

How to borrow mutable value?

I’ve been trying to separate all my Redis operations in a separate implementation, but I got this error when I passed the Redis reference to the implementation. error[E0596]: cannot borrow `*self.redis_client` as mutable, as it is behind a `&` reference –> src/main.rs:30:21 | 30 | let _: () = self.redis_client.set("key", "value").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow… Read More How to borrow mutable value?