Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Cache Machine 来缓存 QuerySet,这涉及将其添加到您的模型中:
class MyModel(CachingMixin, models.Model): objects = CachingManager()
如何将此缓存应用于我无权访问的模型?例如用户或第三方模块。
为作业使用代理模型。由 3rd 方模型继承,覆盖objects并使用此类而不是原始类。
objects