don't cache if the encryption is enabled, this can lead to problems during unit testing
backport from: https://github.com/owncloud/core/commit/909af2b62e75d1a5db866466074f2bcb95b864dc