refactored useCacheWhenOffline -> offlineBehavior