V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
larkifly
V2EX  ›  Python

发现 django-redis 会把设置的值给删掉,这个怎么配置不删除???

  •  
  •   larkifly · 2014-11-19 10:03:29 +08:00 · 2802 次点击
    这是一个创建于 3446 天前的主题,其中的信息可能已经有所发展或是发生改变。
    CACHES = {
    "default": {
    "BACKEND": "redis_cache.cache.RedisCache",
    "LOCATION": "127.0.0.1:6379:1",
    "OPTIONS": {
    "CLIENT_CLASS": "redis_cache.client.DefaultClient",
    }
    }
    }

    127.0.0.1:6379[1]> keys *
    1) "xiaochao"
    2) ":1:django_user_agents.79cf3b876f3e9419808143194975b5ae"
    3) ":1:ethuituzi"
    127.0.0.1:6379[1]> keys *
    1) "xiaochao"

    如上,通过查看,得知django-redis把自己设置的key给删除了,请问这个是不是默认有过期规则????
    1 条回复    2014-11-19 11:38:42 +08:00
    greenmoon55
        1
    greenmoon55  
       2014-11-19 11:38:42 +08:00
    没用过,官方文档上好像有配timeout的吧。
    https://docs.djangoproject.com/en/1.7/topics/cache/
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5704 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 02:23 · PVG 10:23 · LAX 19:23 · JFK 22:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.