mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Thanks Andrew-Chen-Wang for the initial implementation which was posted to the Django forum thread about asyncifying contrib modules.
		
			
				
	
	
		
			11 lines
		
	
	
		
			290 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			290 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from django.core.cache.backends.locmem import LocMemCache
 | |
| 
 | |
| 
 | |
| class CacheClass(LocMemCache):
 | |
| 
 | |
|     def set(self, *args, **kwargs):
 | |
|         raise Exception("Faked exception saving to cache")
 | |
| 
 | |
|     async def aset(self, *args, **kwargs):
 | |
|         raise Exception("Faked exception saving to cache")
 |