Ever been bitten by a Python's default argument behavior? This hack uses that classic gotcha to update the
p_cache list. It is not the most idiomatic code. While it proves you can do almost anything with just functions, it is also proof I should have my Python Licence revoked.