Improving function api_get_current_access_url_id() in order to do not query to the DB