mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #34212 -- Made RedisCacheClient.incr() use write connection.
Co-authored-by: Sin-Woo Bang <sinwoobang@gmail.com>
This commit is contained in:
		
							
								
								
									
										2
									
								
								django/core/cache/backends/redis.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								django/core/cache/backends/redis.py
									
									
									
									
										vendored
									
									
								
							| @@ -130,7 +130,7 @@ class RedisCacheClient: | ||||
|         return bool(client.exists(key)) | ||||
|  | ||||
|     def incr(self, key, delta): | ||||
|         client = self.get_client(key) | ||||
|         client = self.get_client(key, write=True) | ||||
|         if not client.exists(key): | ||||
|             raise ValueError("Key '%s' not found." % key) | ||||
|         return client.incr(key, delta) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user