1. Gilles Devaux
  2. dogpile.cache


jvan...@  committed 1357664

Documentation fix to address points in closed issues 6,12

  • Participants
  • Parent commits 66e5409
  • Branches default

Comments (0)

Files changed (1)

File dogpile/cache/region.py

View file
  • Ignore whitespace
      is the SHA1 mangler found at :func:`.sha1_mangle_key`
      which coerces keys into a SHA1
      hash, so that the string length is fixed.  To
-     disable all key mangling, set to ``False``.
+     disable all key mangling, set to ``False``.   Another typical 
+     mangler is the built-in Python function `str` , which can be used
+     to convert keys to strings.  This can be necessary in situations 
+     where `dogpile.cache` is used with a Framework that defaults to 
+     unicode strings ( such as `Pyramid` ) and a backend that requires
+     byte-strings ( such as bsddb or dbm under Python 2.x ).  Passing 
+     unicode arguments into a cached action will create a TypeError 
+     without an appropriate `key_mangler`.
     :param async_creation_runner:  A callable that, when specified,
      will be passed to and called by dogpile.lock when