warn / document that keymangler is generally needed w/ the function decorators #182
Labels
bug
Something isn't working
caching decorator
things to do with cache on arguments, etc
documentation
region
Problem
Hi I think dogpile.cache is really awesome, however I've been encountering an issue using the memcached backend:
It looks like dogpile.cache uses
__repr__
or__str__
of the parameters to the cached function for the default key. When caching a sequence, this means that the key can be very large. memcached however has a fixed key limit of 250. The solution to the error is nonobvious (implementing one's ownkey_mangler
)Here is the error in question
In the interest of usability, I would recommend adding default
key_mangler
, for all or certain backends. Or at least, there should be caveats section in the documentation.Workaround Solution
Since someone else will likely encounter this, I will post my solution using the xxhash library:
The text was updated successfully, but these errors were encountered: