nerdexam
Microsoft

AZ-204 · Question #150

A development team is developing an application. The application will be working with customer data. The application will also be making use of Azure Redis Cache. You need to invalidate the cache when

The correct answer is A. cache.KeyDelete(p_Customer);. Since you have to invalidate the cache, you have to delete the Key itself Option B is incorrect since you need to work with keys and not the values Option C is incorrect this is used to get the string value Option D is incorrect this is used to set the string value https://docs.m

Submitted by krish.m· Mar 30, 2026Develop for Azure storage

Question

A development team is developing an application. The application will be working with customer data. The application will also be making use of Azure Redis Cache. You need to invalidate the cache when the customer data is changed. You have to complete the below code to comply with the requirement Which of the following will go into Slot2?

Options

  • Acache.KeyDelete(p_Customer);
  • Bcache.ValueDelete(p_Customer);
  • Ccache.StringGet(p_Customer);
  • Dcache.StringSet(p_Customer);

How the community answered

(40 responses)
  • A
    73% (29)
  • B
    15% (6)
  • C
    5% (2)
  • D
    8% (3)

Explanation

Since you have to invalidate the cache, you have to delete the Key itself Option B is incorrect since you need to work with keys and not the values Option C is incorrect this is used to get the string value Option D is incorrect this is used to set the string value https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-dotnet-how-to-use-azure-

Topics

#Azure Cache for Redis#KeyDelete#cache invalidation#StackExchange.Redis

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice