mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #16043 -- Refactored internal fields value cache.
* Removed all hardcoded logic for _{fieldname}_cache. * Added an internal API for interacting with the field values cache. Thanks carljm and MarkusH for support.
This commit is contained in:
parent
22ff86ec52
commit
bfb746f983
11 changed files with 156 additions and 107 deletions
|
@ -207,7 +207,7 @@ class OneToOneTests(TestCase):
|
|||
self.assertIs(p.restaurant, r)
|
||||
|
||||
# But if we kill the cache, we get a new object
|
||||
del p._restaurant_cache
|
||||
del p._state.fields_cache['restaurant']
|
||||
self.assertIsNot(p.restaurant, r)
|
||||
|
||||
# Reassigning the Restaurant object results in an immediate cache update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue