DiskCache: Disk Backed Cache
DiskCache is an Apache2 licensed disk and file backed cache library, written in pure-Python, and compatible with Django.
The cloud-based computing of 2023 puts a premium on memory. Gigabytes of empty space is left on disks as processes vie for memory. Among these processes is Memcached (and sometimes Redis) which is used as a cache. Wouldn’t it be nice to leverage empty disk space for caching?
Django is Python’s most popular web framework and ships with several caching backends. Unfortunately the file-based cache in Django is essentially broken. The culling method is random and large caches repeatedly scan a cache directory which slows linearly with growth. Can you really allow it to take sixty milliseconds to store a key in a cache with a thousand items?
A faster way to copy SQLite databases between computers
Tagged with sqlitePosted 29 April 2025
I store a lot of data in SQLite databases on remote servers, and I often want to copy them to my local machine for analysis or backup.