mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	[VAULT-4034] Revert back to caching nil values (#13013)
* Revert "[VAULT-4034] Only cache non-nil values (#12993)"
This reverts commit 67e1ed06c7.
* Update sdk/physical/cache.go
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
			
			
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							98421bb68c
						
					
				
				
					commit
					fa03adb718
				
			@@ -184,10 +184,8 @@ func (c *Cache) Get(ctx context.Context, key string) (*Entry, error) {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ent != nil {
 | 
			
		||||
		// Cache the result
 | 
			
		||||
		c.lru.Add(key, ent)
 | 
			
		||||
	}
 | 
			
		||||
	// Cache the result, even if nil
 | 
			
		||||
	c.lru.Add(key, ent)
 | 
			
		||||
 | 
			
		||||
	return ent, nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user