What are the Slack Archives?
Itโs a history of our time together in the Slack Community! Thereโs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonโt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Does Spryker provide any way to do a `TTL` command on a redis key?
Comments
-
I dont know any command for that. But if you need to clean up redis, maybe you can use idletime for that. https://unix.stackexchange.com/questions/197469/delete-redis-keys-that-have-been-inactive-for-30-days
We actually had this case for redis session db and set redis Eviction Policy with max memory to auto remove 'old' keys (allkeys-lru https://redis.io/topics/lru-cache)0 -
that's not what TTL is for ๐
what I mean is I need to check whether the key has been refreshed correclty or I need to run a refresh process0 -
storing the expiry date in another key sounds like a bad idea if there is a TTL in redis for checking the expiry
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
hi @UK5DS29L2 do u have to extend self on project level the redis client and the predisAdapter. We have made the same:
RedisClient:/** * @param string $connectionKey * @param string $key * @param int $seconds * * @return bool */ public function expire(string $connectionKey, string $key, int $seconds): bool;
and predisApdapter
/** * @param string $key * @param int $seconds * * @return bool */ public function expire(string $key, int $seconds): bool;
0 -
@UL65CH0MC you're talking about
EXPIRE
command which sets the expire value. I'm looking to lookup the current expire value but I'll just add my own implementation as you have suggested0 -
now I realize you just added this as an example ๐คฆโโ๏ธ
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
yes... just as an example what do have to extend to get this.. ๐ n.p.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K ๐ Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random