2017-01-07 2 views

答えて

0

あなたがキャッシュバックエンドとしてのRedisを使用しますか?それはsimple.Firstはsettings.py

CACHES = { 
    'default': { 
     'BACKEND': 'redis_cache.RedisCache', 
     'LOCATION': 'server:6379', 
    }, 
} 


from django.core.cache import cache 

>>> cache.set('my_key', 'hello, world!', 30) 
>>> cache.get('my_key') 
'hello, world! 
で、その後 ジャンゴ-のRedisキャッシュをインストールします
関連する問題