Getting it to work with no cache

Accidentally broke support for a cache size of 0 – must have forgotten
to test the changes or something. Anyway, it works now.