django-admin-caching icon indicating copy to clipboard operation
django-admin-caching copied to clipboard

CacheKeyWarning: Cache key contains characters that will cause errors if used with memcached:

Open zsoldosp opened this issue 8 years ago • 1 comments

e.g.: with py36-django111

tests/testapp/tests/test_autokeyed_cache.py::test_after_runtime_key_change_its_not_in_cache
  /var/www/gitlibs/django-admin-caching/.tox/py36-django111/lib/python3.6/site-packages/django/core/cache/backends/base.py:243: CacheKeyWarning: Cache key contains characters that will cause errors if used with memcached: ':1:testapp.admin.MyGroupAdmin-auth.Group-first key'
    'used with memcached: %r' % key, CacheKeyWarning
  /var/www/gitlibs/django-admin-caching/.tox/py36-django111/lib/python3.6/site-packages/django/core/cache/backends/base.py:243: CacheKeyWarning: Cache key contains characters that will cause errors if used with memcached: ':1:testapp.admin.MyGroupAdmin-auth.Group-second key'
    'used with memcached: %r' % key, CacheKeyWarning

tests/testapp/tests/test_autokeyed_cache.py::test_can_remove_itself_from_the_cache
  /var/www/gitlibs/django-admin-caching/.tox/py36-django111/lib/python3.6/site-packages/django/core/cache/backends/base.py:243: CacheKeyWarning: Cache key contains characters that will cause errors if used with memcached: ':1:other key'
    'used with memcached: %r' % key, CacheKeyWarning

-- Docs: http://doc.pytest.org/en/latest/warnings.html

zsoldosp avatar Jun 27 '17 08:06 zsoldosp

Reason for the warning: the space in some test keys. You could replace it with an _, but this will only hide the problem.

Eorhim avatar Apr 03 '19 08:04 Eorhim