mirror of
https://github.com/golang/go
synced 2024-11-19 02:44:44 -07:00
b9584148ef
This is primarily to separate the levels because they have different cache lifetimes and sharability. This will allow us to share results between views and even between servers. Change-Id: I280ca19d17a6ea8a15e48637d4445e2b6cf04769 Reviewed-on: https://go-review.googlesource.com/c/tools/+/177518 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
25 lines
448 B
Go
25 lines
448 B
Go
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package cache
|
|
|
|
import (
|
|
"golang.org/x/tools/internal/lsp/source"
|
|
"golang.org/x/tools/internal/lsp/xlog"
|
|
)
|
|
|
|
func New() source.Cache {
|
|
return &cache{}
|
|
}
|
|
|
|
type cache struct {
|
|
}
|
|
|
|
func (c *cache) NewSession(log xlog.Logger) source.Session {
|
|
return &session{
|
|
cache: c,
|
|
log: log,
|
|
}
|
|
}
|