Building a rudimentary cache in Python using Twisted - part 2

I decided to go ahead and try using the cache that I built for some scenario that I might expect to see in real life. Part of the work I do daily demands that I start one thread to create some data that goes into a cache or a messaging layer and then another thread in the same application consumes it - pretty basic multithreading in Java  and nothing really special.

What I wanted to see was if it is possible to use my cache in a similar way in Python , obviously with fewer lines of code. See the below screen shots for the updated code and the execution results.

Written on July 17, 2012