Some time ago I had to perform some time intensive operations in Python. A certain method would always return the same (given the...
Programming
Redis cache decorator
Some time ago I had to perform some time intensive operations in Python. A certain method would always return the same (given the same arguments), but get queried numerous times while running the script. Caching would make this script a lot faster, so I made this easy Redis decorator that can be slapped onto any Python method and make it’s output cacheable right away.
Python output in Docker
When developing a Python application while using Docker, it can sometimes be useful to print some output to the console. By default however, Python buffers it’s output so you won’t get to see it until the process has been restarted.