推荐学习书目
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 · Nov 19, 2014 · 3306 views
    This topic created in 4221 days ago, the information mentioned may be changed or developed.
    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 replies    2014-11-19 11:38:42 +08:00
    greenmoon55
        1
    greenmoon55  
       Nov 19, 2014
    没用过,官方文档上好像有配timeout的吧。
    https://docs.djangoproject.com/en/1.7/topics/cache/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4588 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:57 · PVG 17:57 · LAX 02:57 · JFK 05:57
    ♥ Do have faith in what you're doing.