MCPcopy
hub / github.com/django/django / is_cached

Method is_cached

django/db/models/fields/mixins.py:27–28  ·  view source on GitHub ↗
(self, instance)

Source from the content-addressed store, hash-verified

25 return default
26
27 def is_cached(self, instance):
28 return self.cache_name in instance._state.fields_cache
29
30 def set_cached_value(self, instance, value):
31 instance._state.fields_cache[self.cache_name] = value

Calls

no outgoing calls