feat: allow to use redis cache instead of memory cache (#832)

* feat(backend/cache): allow to use redis cache instead as memory

* feat(frontend/admin): add cache section

Add a new section for cache attributes. Also add US translation.

---------

Co-authored-by: Jules Lefebvre <jules.lefebvre@diabolocom.com>
This commit is contained in:
JulesdeCube
2025-05-25 22:16:19 +02:00
committed by GitHub
parent cfdb29ed4d
commit 85f514316b
8 changed files with 168 additions and 17 deletions

View File

@@ -13,13 +13,14 @@ import Link from "next/link";
import { Dispatch, SetStateAction } from "react";
import {
TbAt,
TbBinaryTree,
TbBucket,
TbMail,
TbScale,
TbServerBolt,
TbSettings,
TbShare,
TbSocial,
TbBucket,
TbBinaryTree,
TbSettings,
TbScale,
} from "react-icons/tb";
import { FormattedMessage } from "react-intl";
@@ -32,6 +33,7 @@ const categories = [
{ name: "LDAP", icon: <TbBinaryTree /> },
{ name: "S3", icon: <TbBucket /> },
{ name: "Legal", icon: <TbScale /> },
{ name: "Cache", icon: <TbServerBolt /> },
];
const useStyles = createStyles((theme) => ({

View File

@@ -423,6 +423,7 @@ export default {
"admin.config.title": "Configuration",
"admin.config.category.general": "General",
"admin.config.category.share": "Share",
"admin.config.category.cache": "Cache",
"admin.config.category.email": "Email",
"admin.config.category.smtp": "SMTP",
"admin.config.category.oauth": "Social Login",
@@ -446,6 +447,19 @@ export default {
"Change your logo by uploading a new image. The image must be a PNG and should have the format 1:1.",
"admin.config.general.logo.placeholder": "Pick image",
"admin.config.cache.ttl": "TTL",
"admin.config.cache.ttl.description":
"Time in second to keep information inside the cache.",
"admin.config.cache.max-items": "Maximum items",
"admin.config.cache.max-items.description":
"Maximum number of items inside the cache.",
"admin.config.cache.redis-enabled": "Redis enabled",
"admin.config.cache.redis-enabled.description":
"Normally Pingvin Share caches information in memory. If you run multiple instances of Pingvin Share, you need to enable Redis caching to share the cache between the instances.",
"admin.config.cache.redis-url": "Redis URL",
"admin.config.cache.redis-url.description":
"Url to connect to the Redis instance used for caching.",
"admin.config.email.enable-share-email-recipients":
"Enable email recipient sharing",
"admin.config.email.enable-share-email-recipients.description":