cache in_app pattern