[test] Fix some random test failures
[test] Fix some random test failures

When running tests while playing around with the development enviroment,
some tests the reset the cache can fail because the cache directory is
not empty. We fix this by storing the cache in memory for tests.

apardo/nolotiro.org,alabs/nolotiro.org,alabs/nolotiro.org,apardo/nolotiro.org,alabs/nolotiro.org,apardo/nolotiro.org,alabs/nolotiro.org,apardo/nolotiro.org