﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17256	ContentTypeManager.get_by_natural_key method doesn't cache	defaultwombat	nobody	"django.contrib.contenttypes.models.py
ContentTypeManager.get_by_natural_key
{{{
#!div style=""font-size: 80%""
Code highlighting:
  {{{#!python
    def get_by_natural_key(self, app_label, model):
        try:
            ct = self.__class__._cache[self.db][(app_label, model)]
        except KeyError:
            ct = self.get(app_label=app_label, model=model)
        return ct
  }}}
}}}
If the content_type is not in the cache yet, the method uses get() without adding the result to the cache.

I cannot see how #16042 could be solved without fixing this."	Bug	closed	contrib.contenttypes	1.3	Normal	fixed	cache contenttypes		Ready for checkin	1	0	0	0	0	0
