Commits

Marcos Araujo Sobrinho committed 0cb12a1 Merge

version number

Comments (0)

Files changed (4)

docs/build/changelog.rst

 Changelog
 ==============
 .. changelog::
+    :version: 0.4.4
+
+    .. change::
+        :tags: bug
+        :tickets: 27
+
+      Fixed bug where the "name" parameter for
+      :class:`.CacheRegion` was ignored entirely.
+      Courtesy Wichert Akkerman.
+
+.. changelog::
     :version: 0.4.3
     :released: Thu Apr 4 2013
 

docs/build/usage.rst

 For example, to create a backend called ``DictionaryBackend``, we subclass
 :class:`.CacheBackend`::
 
-    from dogpile.cache import CacheBackend, NO_VALUE
+    from dogpile.cache.api import CacheBackend, NO_VALUE
 
     class DictionaryBackend(CacheBackend):
         def __init__(self, arguments):

dogpile/cache/region.py

             async_creation_runner=None,
     ):
         """Construct a new :class:`.CacheRegion`."""
+        self.name = name
         self.function_key_generator = function_key_generator
         if key_mangler:
             self.key_mangler = key_mangler

tests/cache/test_region.py

         reg.configure(backend, **config_args)
         return reg
 
+    def test_set_name(self):
+        my_region = make_region(name='my-name')
+        eq_(my_region.name, 'my-name')
+
     def test_instance_from_dict(self):
         my_conf = {
             'cache.example.backend': 'mock',