Minor fixes in specs

Made specs more efficient by localizing cache flushes to tests
which really need them.