Skip to content

Gitea not accepting "redis-cluster" as cache adapter/session provider #30534

Closed
@SomanathThilak

Description

@SomanathThilak

Description

Gitea is not accepting Cache ADAPTER or Session PROVIDER as "redis-cluster".

In the documentation it is mentioned to use string "redis-cluster" when redis cluster instance is used for cache/session. But when Gitea is installed with ADAPTER/PROVIDER set to redis-cluster, it is instead configuring it to memory.

On analysis of code, it seems string "redis-cluster" is not supported for ADAPTER/PROVIDER.

Cache :

CacheService.Adapter = sec.Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache", "twoqueue"})

Session:

SessionConfig.Provider = sec.Key("PROVIDER").In("memory",

[]string{"memory", "file", "redis", "mysql", "postgres", "couchbase", "memcache", "db"})

Documentation Reference
Cache - https://docs.gitea.com/1.20/administration/config-cheat-sheet#cache-cache
Session - https://docs.gitea.com/1.20/administration/config-cheat-sheet#session-session

When it is set to "redis" both cache/session seems to be working fine even for redis cluster instances.

Gitea Version

1.21.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

When redis-cluster is used for ADAPTER/SESSION
tempsnip2

When using redis as ADAPTER
tempsnip

Git Version

No response

Operating System

No response

How are you running Gitea?

Gitea installed in a K8s environment with charts taken from https://dl.gitea.com/charts/

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugtype/docsThis PR mainly updates/creates documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions