mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user