-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Not sure if I missed something, but following example is changed from user doc.
from dogpile.cache import make_region
from dogpile.cache.proxy import ProxyBackend
import logging
log = logging.getLogger(__name__)
class LoggingProxy(ProxyBackend):
def set(self, key, value):
log.debug("Setting Cache Key: %s" % key)
self.proxied.set(key, value)
region = make_region().configure(
"dogpile.cache.dbm",
expiration_time=3600,
arguments={
"filename": "/tmp/cache",
},
wrap=[LoggingProxy],
)
region.get("k")
Traceback (most recent call last):
File "/tmp/t/dogpile/test.py", line 22, in <module>
region.get("k")
File "/tmp/t/dogpile/env/lib/python3.9/site-packages/dogpile/cache/region.py", line 765, in get
value = self._get_from_backend(key)
File "/tmp/t/dogpile/env/lib/python3.9/site-packages/dogpile/cache/region.py", line 1265, in _get_from_backend
self.backend.get_serialized(key)
File "/tmp/t/dogpile/env/lib/python3.9/site-packages/dogpile/cache/api.py", line 288, in get_serialized
return cast(SerializedReturnType, self.get(key))
File "/tmp/t/dogpile/env/lib/python3.9/site-packages/dogpile/cache/proxy.py", line 85, in get
return self.proxied.get(key)
File "/tmp/t/dogpile/env/lib/python3.9/site-packages/dogpile/cache/api.py", line 245, in get
raise NotImplementedError()
NotImplementedError
env
$ pip list
Package Version
------------- -------
decorator 5.0.9
dogpile.cache 1.1.2
pbr 5.6.0
pip 20.3.4
pkg-resources 0.0.0
setuptools 44.1.1
stevedore 3.3.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working