mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-05-14 09:17:09 +02:00
Add redis for caching, first try during a train ride so expect it to not be working yet
This commit is contained in:
parent
b8b9886ee1
commit
5b6eecc75f
12 changed files with 149 additions and 32 deletions
4
server/cache/interface.go
vendored
4
server/cache/interface.go
vendored
|
@ -4,7 +4,7 @@ import "time"
|
|||
|
||||
// ICache is an interface that defines how the pages server interacts with the cache.
|
||||
type ICache interface {
|
||||
Set(key string, value interface{}, ttl time.Duration) error
|
||||
Get(key string) (interface{}, bool)
|
||||
Set(key string, value string, ttl time.Duration) error
|
||||
Get(key string) (string, bool)
|
||||
Remove(key string)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue