(app_release_by_location)
expire cache for the location and its descendants for the app corresponding to this enabled app release
    why? : Latest enabled release for a location is dependent on restrictions added for
    itself and its ancestors. Hence we expire the cache for location and its descendants for which the
    latest enabled release would depend on this location
expire cache for the location and its descendants for the app corresponding to this enabled app release
    why? : Latest enabled release for a location is dependent on restrictions added for
    itself and its ancestors. Hence we expire the cache for location and its descendants for which the
    latest enabled release would depend on this location
expire cache for the location and its descendants for the app corresponding to this enabled app release why? : Latest enabled release for a location is dependent on restrictions added for itself and its ancestors . Hence we expire the cache for location and its descendants for which the latest enabled release would depend on this location
def expire_get_latest_app_release_by_location_cache(app_release_by_location):
    """
    expire cache for the location and its descendants for the app corresponding to this enabled app release
    why? : Latest enabled release for a location is dependent on restrictions added for
    itself and its ancestors. Hence we expire the cache for location and its descendants for which the
    latest enabled release would depend on this location
    """
    location = SQLLocation.active_objects.get(location_id=app_release_by_location.location_id)
    location_and_descendants = location.get_descendants(include_self=True)
    for loc in location_and_descendants:
        get_latest_app_release_by_location.clear(app_release_by_location.domain, loc.location_id,
                                          app_release_by_location.app_id)
def expire_get_latest_app_release_by_location_cache ( app_release_by_location ) : location = SQLLocation . active_objects . get ( location_id = app_release_by_location . location_id ) location_and_descendants = location . get_descendants ( include_self = True ) for loc in location_and_descendants : get_latest_app_release_by_location . clear ( app_release_by_location . domain , loc . location_id , app_release_by_location . app_id )