[SW] Bug 940273 Fix logic for when to create CacheStorage db.