void hc_decache_reference(struct hc_resolver_s *r, struct hc_url_s *url) { struct hashstr_s *hk; GRID_TRACE2("%s(%s)", __FUNCTION__, hc_url_get(url, HCURL_WHOLE)); g_assert(r != NULL); g_assert(url != NULL); if (r->flags & HC_RESOLVER_NOCACHE) return; hk = hashstr_printf("meta0|%s", hc_url_get(url, HCURL_NSPHYS)); hc_resolver_forget(r, r->csm0.cache, hk); g_free(hk); hk = hashstr_printf("meta1|%s|%.4s", hc_url_get(url, HCURL_NSPHYS), hc_url_get(url, HCURL_HEXID)); hc_resolver_forget(r, r->csm0.cache, hk); g_free(hk); }
void hc_decache_reference_service(struct hc_resolver_s *r, struct hc_url_s *url, const gchar *srvtype) { struct hashstr_s *hk; GRID_TRACE2("%s(%s,%s)", __FUNCTION__, hc_url_get(url, HCURL_WHOLE), srvtype); EXTRA_ASSERT(r != NULL); EXTRA_ASSERT(url != NULL); EXTRA_ASSERT(srvtype != NULL); if (r->flags & HC_RESOLVER_NOCACHE) return; hk = hashstr_printf("%s|%s|%s", srvtype, hc_url_get(url, HCURL_NS), hc_url_get(url, HCURL_HEXID)); hc_resolver_forget(r, r->services.cache, hk); g_free(hk); }