Mercurial > gemma
diff pkg/octree/cache.go @ 1692:f4dcbe8941a1
Octree: Resolved the remaing golint issues with this package.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 31 Dec 2018 11:13:49 +0100 |
parents | 8c6b5d47a7ff |
children | 86c7a023400e |
line wrap: on
line diff
--- a/pkg/octree/cache.go Sun Dec 30 16:24:51 2018 +0100 +++ b/pkg/octree/cache.go Mon Dec 31 11:13:49 2018 +0100 @@ -31,6 +31,9 @@ tree *Tree access time.Time } + + // Cache holds Octrees for a defined amount of time in memory + // before they are released. Cache struct { sync.Mutex entries map[cacheKey]*cacheEntry @@ -87,6 +90,7 @@ } } +// FromCache fetches an Octree from the global Octree cache. func FromCache( ctx context.Context, conn *sql.Conn, @@ -135,7 +139,7 @@ } } - tree, err := Deserialize(data) + tree, err := deserialize(data) if err != nil { return nil, err }