client: remove cache responses
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -34,9 +34,6 @@ type Options struct {
|
||||
PoolSize int
|
||||
PoolTTL time.Duration
|
||||
|
||||
// Response cache
|
||||
Cache *Cache
|
||||
|
||||
// Middleware for client
|
||||
Wrappers []Wrapper
|
||||
|
||||
@@ -61,8 +58,6 @@ type CallOptions struct {
|
||||
Address []string
|
||||
// Backoff func
|
||||
Backoff BackoffFunc
|
||||
// Duration to cache the response for
|
||||
CacheExpiry time.Duration
|
||||
// Transport Dial Timeout
|
||||
DialTimeout time.Duration
|
||||
// Number of Call attempts
|
||||
@@ -145,7 +140,6 @@ type RequestOptions struct {
|
||||
|
||||
func NewOptions(opts ...Option) Options {
|
||||
options := Options{
|
||||
Cache: NewCache(),
|
||||
Context: context.Background(),
|
||||
ContentType: "application/protobuf",
|
||||
Codecs: make(map[string]codec.NewCodec),
|
||||
@@ -400,14 +394,6 @@ func WithAuthToken() CallOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithCache is a CallOption which sets the duration the response
|
||||
// shoull be cached for
|
||||
func WithCache(c time.Duration) CallOption {
|
||||
return func(o *CallOptions) {
|
||||
o.CacheExpiry = c
|
||||
}
|
||||
}
|
||||
|
||||
// WithNetwork is a CallOption which sets the network attribute
|
||||
func WithNetwork(n string) CallOption {
|
||||
return func(o *CallOptions) {
|
||||
|
Reference in New Issue
Block a user