#20291: Add method to reload `AppCache`
-----------------------------------+--------------------
     Reporter:  vzima              |      Owner:  nobody
         Type:  New feature        |     Status:  new
    Component:  Testing framework  |    Version:  master
     Severity:  Normal             |   Keywords:
 Triage Stage:  Unreviewed         |  Has patch:  0
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+--------------------
 Some tests require test application, e.g.
 
[https://github.com/django/django/blob/master/tests/proxy_model_inheritance/tests.py
 proxy_model_inheritance]. Adding test application is simple, but removing
 is not so simple.

 I propose addition of new method which would clean caches and repopulate
 them.
 {{{
 #!python
 def reload(self):
     # Clean cache
     self._get_models_cache.clear()
     self.handled.clear()
     # Mark cache is empty
     self.loaded = False
     # Populate cache again
     self._populate()
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20291>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to