mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
updates old distcache names
This commit is contained in:
@@ -18,7 +18,7 @@ type databaseCache struct {
|
|||||||
func newDatabaseCache(sqlstore *sqlstore.SqlStore) *databaseCache {
|
func newDatabaseCache(sqlstore *sqlstore.SqlStore) *databaseCache {
|
||||||
dc := &databaseCache{
|
dc := &databaseCache{
|
||||||
SQLStore: sqlstore,
|
SQLStore: sqlstore,
|
||||||
log: log.New("distcache.database"),
|
log: log.New("remotecache.database"),
|
||||||
}
|
}
|
||||||
|
|
||||||
return dc
|
return dc
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ func TestDatabaseStorageGarbageCollection(t *testing.T) {
|
|||||||
|
|
||||||
db := &databaseCache{
|
db := &databaseCache{
|
||||||
SQLStore: sqlstore,
|
SQLStore: sqlstore,
|
||||||
log: log.New("distcache.database"),
|
log: log.New("remotecache.database"),
|
||||||
}
|
}
|
||||||
|
|
||||||
obj := &CacheableStruct{String: "foolbar"}
|
obj := &CacheableStruct{String: "foolbar"}
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ func init() {
|
|||||||
|
|
||||||
// CacheStorage allows the caller to set, get and delete items in the cache.
|
// CacheStorage allows the caller to set, get and delete items in the cache.
|
||||||
// Cached items are stored as byte arrays and marshalled using "encoding/gob"
|
// Cached items are stored as byte arrays and marshalled using "encoding/gob"
|
||||||
// so any struct added to the cache needs to be registred with `distcache.Register`
|
// so any struct added to the cache needs to be registred with `remotecache.Register`
|
||||||
// ex `distcache.Register(CacheableStruct{})``
|
// ex `remotecache.Register(CacheableStruct{})``
|
||||||
type CacheStorage interface {
|
type CacheStorage interface {
|
||||||
// Get reads object from Cache
|
// Get reads object from Cache
|
||||||
Get(key string) (interface{}, error)
|
Get(key string) (interface{}, error)
|
||||||
|
|||||||
Reference in New Issue
Block a user