experiments/demo_bench.py
def dumps(cls, value):
        """'
        strip out the payload before packing,
        save the timestamp, but convert it to an int() first

        why?
        Redis has precision on seconds, not microseconds
            1471111902.170488
            1471111902
        """
        if isinstance(value, CachedValue):
            value = (value.payload, int(value.metadata["ct"]))
        value = msgpack.packb(value)
        return value

        strip out the payload before packing,
        save the timestamp, but convert it to an int() first

        why?
        Redis has precision on seconds, not microseconds
            1471111902.170488
            1471111902
        
strip out the payload before packing,
save the timestamp, but convert it to an int() first


strip out the payload before packing save the timestamp but convert it to an int () first
def dumps(cls, value):
        if isinstance(value, CachedValue):
            value = (value.payload, int(value.metadata["ct"]))
        value = msgpack.packb(value)
        return value
def dumps ( cls , value ) : if isinstance ( value , CachedValue ) : value = ( value . payload , int ( value . metadata [ "ct" ] ) ) value = msgpack . packb ( value ) return value
strip out the payload before packing,
save the timestamp, but convert it to an int() first
strip out the payload before packing save the timestamp but convert it to an int () first
"""'
        strip out the payload before packing,
        save the timestamp, but convert it to an int() first

        why?
        Redis has precision on seconds, not microseconds
            1471111902.170488
            1471111902
        """
cls
value