From d61cbd29db7308ec5cf8f719edeacb8e08142784 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Fri, 7 Aug 2020 11:22:57 +0100 Subject: [PATCH] Update README.md --- registry/cache/README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/registry/cache/README.md b/registry/cache/README.md index d3221f6d..ae208523 100644 --- a/registry/cache/README.md +++ b/registry/cache/README.md @@ -19,13 +19,11 @@ type Cache interface { ## Usage ```go -import ( - "github.com/micro/go-micro/registry" - "github.com/micro/go-micro/registry/cache" -) +import "github.com/micro/go-micro/registry/cache" -r := registry.NewRegistry() -cache := cache.New(r) +# create a new cache +c := cache.New(registry) -services, _ := cache.GetService("my.service") +# get a service from the cache +services, _ := c.GetService("helloworld") ```