readme md

main
serr 2025-01-06 14:39:05 +03:00
parent f4d9a23e79
commit f70e396bca
1 changed files with 29 additions and 47 deletions

View File

@ -131,23 +131,6 @@ map, struct, func
# Пример использования
```go
package main
import (
"fmt"
"log"
"main/candycache"
"os"
"time"
)
type Person struct {
Name string
Age int
Hobbies []string
}
func main() {
cache := candycache.Cacher(10 * time.Minute) // Создаем кэш с интервалом очистки 10 минут
cache.Set("key1", "string", 5*time.Minute)
@ -187,5 +170,4 @@ func main() {
for _, i := range list {
fmt.Println(i.Key, i.Item.Data(), i.Item.DestroyTimestamp())
}
}
```