Wednesday, November 21, 2018

Seeing ints instead of booleans from your memcache?

The latest PyLibMc has changed the way in which booleans are stored from strings to integers to avoid conflicts in which python-memcached manages them. The end result? If you were noticing that your cache is returning ints instead of True/False, this change in PyLibMC cached this issue!

https://github.com/lericson/pylibmc/issues/242

If you have API responses that are returning invalid values, you'll need to wrap the value in bool() to fix the issue!