func (p *Provider) OpenStore(name string) (storage.Store, error) {
	p.mu.Lock()
	defer p.mu.Unlock()

	s, ok := p.cacheList[name]
	if !ok {
		s = &cacheStore{
			name:   name,
			gc:     p.gcCreator(),
			exp:    p.exp,
			logger: p.logger,
			close:  p.removeStore,
		}

		p.cacheList[name] = s

		p.logger.Debugf("new cache %q created", name)

		return s, nil
	}

	return s, nil
}
// OpenStore opens and returns a new cache store for the given namespace.
OpenStore opens and returns a new cache store for the given namespace.
// OpenStore opens and returns a new cache store for the given namespace .
func (p *Provider) OpenStore(name string) (storage.Store, error) {
	p.mu.Lock()
	defer p.mu.Unlock()
	s, ok := p.cacheList[name]
	if !ok {
		s = &cacheStore{
			name:   name,
			gc:     p.gcCreator(),
			exp:    p.exp,
			logger: p.logger,
			close:  p.removeStore,
		}
		p.cacheList[name] = s
		p.logger.Debugf("new cache %q created", name)
		return s, nil
	}
	return s, nil
}
func ( p * Provider ) OpenStore ( name string ) ( storage . Store , error ) { p . mu . Lock ( ) defer p . mu . Unlock ( ) s , ok := p . cacheList [ name ] if ! ok { s = & cacheStore { name : name , gc : p . gcCreator ( ) , exp : p . exp , logger : p . logger , close : p . removeStore , } p . cacheList [ name ] = s p . logger . Debugf ( " " , name ) return s , nil } return s , nil }
OpenStore opens and returns a new cache store for the given namespace.
OpenStore opens and returns a new cache store for the given namespace .