Released a new package today: django-cache-memoize
It's actually quite simple; a Python memoize function that uses Django's cache plus the added trick that you can invalidate the cache my doing the same function call with the same parameters if you just add
.invalidate to your function.
The history of it is from my recent Mozilla work on Symbols.
I originally copy and pasted the snippet out that in a blog post and today I extracted it out into its own project with tests, docs, CI and a
I'm still amazed how long it takes to make a package with all the "fluff" around it. A lot of the bits in here (like
pytest.ini etc) are copied from other nicely maintained Python packages. For example, I straight up copied the
tox.ini from Jannis Leidel's
python-dockerflow. The ratio of actual code writing (including tests!) is far overpowered by the package sit-ups. But I "complain with a pinch of salt" because a lot of time spent was writing documentation and that's equally as important as the code probably.