tahrir.cache module

tahrir.cache.str_to_bytes(input)[source]

If input is a unicode string, encodes it and returns the result.

Otherwise just passes it through. Needed to deal with dogpile key mangling.