mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
More tests for disk cache
This commit is contained in:
parent
ec6910074f
commit
ca0ff68d8e
3 changed files with 61 additions and 24 deletions
|
|
@ -43,7 +43,9 @@ func NewDiskCache(path string, max_size int64) (dc *DiskCache, err error) {
|
|||
if err = os.MkdirAll(path, 0o700); err != nil {
|
||||
return
|
||||
}
|
||||
return &DiskCache{Path: path, MaxSize: max_size}, nil
|
||||
dc = &DiskCache{Path: path, MaxSize: max_size}
|
||||
err = dc.prune()
|
||||
return
|
||||
}
|
||||
|
||||
func KeyForPath(path string) (key string, err error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue