簡單問題: 我的服務器有1G的RAM和10GB的磁盤空間 我使用per-site cache,我想用盡可能Memcached,但是當它的空間不足時,那個cache will be saved in hard disk。 (所有網站的頁面一起約2GB) 有一個簡單的配置來實現這一目標? 這是一件聰明的事情嗎? 感謝
爲什麼第一個示例拋出TypeError (can't pickle function objects),第二個示例沒有,我想這與QuerySet評估(Django 1.4)有關? def get_or_set_foo_cache():
if not cache.get('foo'):
foo = Foo.objects.annotate(bar_count=Count('ba
我使用django-tastypie爲模型製作資源。 你能告訴我如何緩存我ArtistResource的脫水方法嗎? 我應該提供哪些額外的django設置來使用緩存? 非常感謝。我以前從未使用緩存,所以我對此感到灰心。 class ArtistResource(DehydrateImageMixin, SearchableResource):
class Meta:
fi