<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_apphook_field_names(model):
 """ Cache app-hook field names on model :param model: model class or object :return: list of foreign key field names to AppHookConfigs """

    key = APP_CONFIG_FIELDS_KEY.format(
        app_label=model._meta.app_label,
        model_name=model._meta.object_name
    ).lower()
    if not hasattr(model, key):
        field_names = _get_apphook_field_names(model)
        setattr(model, key, field_names)
    return getattr(model, key)