diff --git a/pkg/storage/etcd/etcd_helper.go b/pkg/storage/etcd/etcd_helper.go index 896baf63f74..fc786fcceb7 100644 --- a/pkg/storage/etcd/etcd_helper.go +++ b/pkg/storage/etcd/etcd_helper.go @@ -35,6 +35,7 @@ import ( etcdutil "k8s.io/kubernetes/pkg/storage/etcd/util" "k8s.io/kubernetes/pkg/util" utilnet "k8s.io/kubernetes/pkg/util/net" + utilcache "k8s.io/kubernetes/pkg/util/cache" "k8s.io/kubernetes/pkg/watch" etcd "github.com/coreos/etcd/client" @@ -128,7 +129,7 @@ func NewEtcdStorage(client etcd.Client, codec runtime.Codec, prefix string, quor copier: api.Scheme, pathPrefix: path.Join("/", prefix), quorum: quorum, - cache: util.NewCache(maxEtcdCacheEntries), + cache: utilcache.NewCache(maxEtcdCacheEntries), } } @@ -155,7 +156,7 @@ type etcdHelper struct { // support multi-object transaction that will result in many objects with the same index. // Number of entries stored in the cache is controlled by maxEtcdCacheEntries constant. // TODO: Measure how much this cache helps after the conversion code is optimized. - cache util.Cache + cache utilcache.Cache } func init() { diff --git a/pkg/util/cache.go b/pkg/util/cache/cache.go similarity index 99% rename from pkg/util/cache.go rename to pkg/util/cache/cache.go index 47e30ca31d0..1d4cb923cec 100644 --- a/pkg/util/cache.go +++ b/pkg/util/cache/cache.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package cache import ( "sync" diff --git a/pkg/util/cache_test.go b/pkg/util/cache/cache_test.go similarity index 99% rename from pkg/util/cache_test.go rename to pkg/util/cache/cache_test.go index a54f9e60981..8a86a72a503 100644 --- a/pkg/util/cache_test.go +++ b/pkg/util/cache/cache_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package cache import ( "testing"