MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / Persist

Method Persist

structure/string.go:364–373  ·  view source on GitHub ↗

Persist removes the expiration time of a key

(key string)

Source from the content-addressed store, hash-verified

362
363// Persist removes the expiration time of a key
364func (s *StringStructure) Persist(key string) error {
365 // Get the value
366 value, err := s.Get(key)
367 if err != nil {
368 return err
369 }
370
371 // Set the value
372 return s.Set(key, value, 0)
373}
374
375// TTL returns the time to live of a key
376func (s *StringStructure) TTL(key string) (int64, error) {

Callers

nothing calls this directly

Calls 2

GetMethod · 0.95
SetMethod · 0.95

Tested by

no test coverage detected