Python Bytes · Hands-On Engineering Podcasts · November 2026
Calvin asked whether the existing diskcache library was good enough and whether a rebuild was needed. Michael answers with his own benchmark of the original library under free-threaded Python, which is why he wrote a Rust-backed version.
…On a single SQLite file with one thread, just straight Gil Python, nothing fancy yet. It does in a 99 to 1 read-write ratio. So 99 reads, one write. That's pretty cache standard. There's also a graph for a thousand reads and one write. It does 670,000 reads and writes a second. A second. Okay.
Michael, isn't it just good enough? Do we need this?
Yes, we do because the previous one was also very impressive. Like I do not take away my positive comments about regular disk cache. But if, and here, remember the free-threaded mission, this is my mission. What happens if I take that same awesome disk cache, not mine, the original, and I use it in a multi-threaded situation? It goes from 400,000 requests a second to 19,000. It's 20 times slower if I try to use it in a free-threaded way. Yeah. Broken as that. It's no good. And it's just, it was built for a different time, right? And I would be totally content if I think the guy's name is Greg. Greg behind it would like go, yeah, we're totally going to ramp this thing up. But he got hired at OpenAI and then like the next day, like responses on GitHub. Like there was just, maybe it's a corporate thing. I don't know. He's just like not allowed to even reply, but done. So I went through and I said, I want to take a similar API, not identical, but almost the same. And I want to build this free-threaded, multi-threaded, rust-based version of this.…
you're ready to deploy onto PyZero now.
Yes. Yeah. 100%. So you give it just SQLite file and it can be durable or not. So the serialization for disk cache, and a lot of these caches, I think I saw it in the other one is pickle. That's just wrong to me. Like it's a security violation. You hear this a lot with Hugging Face and those types…
That's pretty incredible. Yeah. And this is modern now.