File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 1515from django .db import connection , IntegrityError , models , transaction
1616from django .db .models import Q
1717from django .db .models .functions import Lower
18- from django .core .signals import request_started
1918from django .db .models .signals import pre_delete , post_save
2019from django .dispatch import receiver
2120from django .urls import reverse
@@ -1609,18 +1608,6 @@ class Meta:
16091608# Signal handlers to clear model cache when definitions change
16101609
16111610
1612- @receiver (request_started )
1613- def clear_cache_on_request (sender , ** kwargs ):
1614- """
1615- Clear the model cache at the start of each request.
1616-
1617- The cache is not a performance cache, it is a recursion prevention cache,
1618- mainly for __init__ get_models() and get_model() methods. This makes
1619- sure that each request will have a fresh model cache.
1620- """
1621- CustomObjectType .clear_model_cache ()
1622-
1623-
16241611@receiver (post_save , sender = CustomObjectType )
16251612def clear_cache_on_custom_object_type_save (sender , instance , ** kwargs ):
16261613 """
You can’t perform that action at this time.
0 commit comments