diff --git a/app/abi/cache.go b/app/abi/cache.go index 86c9c9e..ac595f0 100644 --- a/app/abi/cache.go +++ b/app/abi/cache.go @@ -38,5 +38,5 @@ func (cache *Cache) Set(account string, abi *eos.ABI, ttl time.Duration) error { } func (cache *Cache) key(account string) string { - return cache.prefix + "." + account + return cache.prefix + "::" + account } diff --git a/app/abi/cache_test.go b/app/abi/cache_test.go index 0bfb0a9..da74e74 100644 --- a/app/abi/cache_test.go +++ b/app/abi/cache_test.go @@ -75,7 +75,7 @@ var abiString = ` func TestGetSet(t *testing.T) { client, mock := redismock.NewClientMock() - c := NewCache("abi.cache.test", &redis_cache.Options{ + c := NewCache("thalos::cache::test", &redis_cache.Options{ Redis: client, // Cache 10k keys for 1 minute. LocalCache: redis_cache.NewTinyLFU(10000, time.Minute), @@ -86,7 +86,7 @@ func TestGetSet(t *testing.T) { bytes, _ := c.c.Marshal(*abi) - mock.ExpectSet("abi.cache.test.testaccount", bytes, time.Minute).SetVal("OK") + mock.ExpectSet("thalos::cache::test::testaccount", bytes, time.Minute).SetVal("OK") err = c.Set("testaccount", abi, time.Minute) assert.NoError(t, err) @@ -147,7 +147,7 @@ func TestGetSet(t *testing.T) { func TestCacheMiss(t *testing.T) { client, _ := redismock.NewClientMock() - c := NewCache("abi.cache.test", &redis_cache.Options{ + c := NewCache("thalos::cache::test", &redis_cache.Options{ Redis: client, // Cache 10k keys for 1 minute. LocalCache: redis_cache.NewTinyLFU(10000, time.Minute),