1
votes

Does SqlCacheDependency works for Azure Blob Storage?

I have action which gets some blob from storage (values is most of time as constants). I try to use OutputCache for this action. Then I try to use SqlCacheDependency to clear cache if in blob is some changes, but this doesn't work.

So how can I use SqlCacheDependency or something similar to it for Blobs?

[HttpGet]
[OutputCache(Duration = int.MaxValue, VaryByParam = "none")]
public ActionResult GetCalculatorSalaries()
{
    var salaries = _service.LoadCalculatorSalaries();
    return Json(salaries, JsonRequestBehavior.AllowGet);
}
1
Azure Blob Storage is not SQL, so I'd say no. - usr

1 Answers

1
votes

AFAIK there is no relationship between an Azure Blob and SQL Azure - so sqlCacheDependency will not work.

The new (preview) Azure Redis Cache is probably worth investigating.