70-489 · Question #49
You need to implement caching in your code. Which caching option should you use?
The correct answer is C. Windows Server AppFabric Cache. Windows Server AppFabric Cache provides a programmatic distributed caching API that custom code can use directly to cache objects across multiple servers in a SharePoint farm.
Question
You need to implement caching in your code. Which caching option should you use?
Options
- AObject Cache
- BDistributed Cache
- CWindows Server AppFabric Cache
- DASP.NET cache
How the community answered
(44 responses)- A2% (1)
- C93% (41)
- D5% (2)
Why each option
Windows Server AppFabric Cache provides a programmatic distributed caching API that custom code can use directly to cache objects across multiple servers in a SharePoint farm.
Object Cache is a SharePoint-specific mechanism designed for caching page rendering objects and site data during page builds, not for general-purpose programmatic caching in custom code.
The SharePoint Distributed Cache service wraps AppFabric internally but exposes it only for specific platform services such as feeds and security tokens - it is not a general-purpose caching API available to custom developer code.
Windows Server AppFabric Cache exposes developer APIs such as DataCacheFactory and DataCache, allowing code to programmatically store and retrieve cached objects in a distributed, cross-server in-memory store. This makes it the appropriate choice when implementing caching logic directly in custom application code deployed to a multi-server environment.
ASP.NET cache is an in-process, single-server cache that does not replicate or distribute across farm servers, making it unsuitable for multi-server farm deployments where cache consistency is required.
Concept tested: AppFabric Cache programmatic distributed caching in SharePoint
Source: https://learn.microsoft.com/en-us/sharepoint/administration/plan-for-feeds-and-the-distributed-cache-service
Topics
Community Discussion
No community discussion yet for this question.