1. Mikhail Korobov
  2. django-cache-utils
Issue #3 new

can not cache values longer than 300 sec when "group" provided

stranger_ffm
created an issue

Hi Mike,

there is a bug in django-cache-utils: whan "group" argument is set values disappears from cache after 5 minutes. Attached the test case and the memcached log. I think it is something in the group_backend.py in _get_hashkey()

Comments (2)

  1. stranger_ffm reporter

    Ok, it seems specifying long default timeout helps:

    CACHES = {
        'default': {
            'BACKEND': 'cache_utils.group_backend.CacheClass',
            'LOCATION': '127.0.0.1:11211',
            'TIMEOUT': 60*60*24*365, 
        },
    }
    

    If this was the reason - would be good to mention it in the README

  2. Log in to comment