Added a default lifetime for cache entries when using redis

This commit is contained in:
Alejandro Celaya 2022-01-07 21:37:24 +01:00
parent dc648b0142
commit 364734094b
3 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
## [Unreleased]
## [2.10.2] - 2022-01-07
### Added
* *Nothing*
@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
### Fixed
* [#1293](https://github.com/shlinkio/shlink/issues/1293) Fixed error when trying to create/import short URLs with a too long title.
* [#1306](https://github.com/shlinkio/shlink/issues/1306) Ensured remote IP address is not logged when using swoole/openswoole.
* [#1308](https://github.com/shlinkio/shlink/issues/1308) Fixed memory leak when using redis due to the amount of non-expiring keys created by doctrine. Now they have a 24h expiration by default.
## [2.10.1] - 2021-12-21

View file

@ -48,7 +48,7 @@
"predis/predis": "^1.1",
"pugx/shortid-php": "^1.0",
"ramsey/uuid": "^4.2",
"shlinkio/shlink-common": "^4.2.1",
"shlinkio/shlink-common": "^4.3",
"shlinkio/shlink-config": "^1.4",
"shlinkio/shlink-event-dispatcher": "^2.3",
"shlinkio/shlink-importer": "^2.5",

View file

@ -11,6 +11,7 @@ return (static function (): array {
$redisServers === null => [],
default => [
'cache' => [
'default_lifetime' => 86400, // 24h
'redis' => [
'servers' => $redisServers,
'sentinel_service' => env('REDIS_SENTINEL_SERVICE'),