DRAG DROP
You are developing a web application by using Microsoft ASP.NET MVC.
The web application will shoe a list of cars and their associated prices. The list can be filtered by car model by
using a drop-down list. Access to the web application will be anonymous.
The car model list is stored as an .xml file on the application server. The car prices list is stored on a SQL
Server server.
You need to recommend a caching strategy for each scenario:
If a user selects a car model from the drop-down list, and then closes the browser, the same model must be
selected automatically when the user reopens the web application from the same browser.
If the car model list is updated, the drop-down list must be refreshed upon the next page reload.
If the car prices list is updated, the prices list must be refreshed upon the next page reload.
What should you recommend? To answer, drag the appropriate caching strategies to the correct scenarios.
Each caching strategy may be used once, more than once, or not at all. You may need to drag the split bar
between panes or scroll to view content.
Select and Place:
Explanation:
Box 1: outputCache
outputCache declaratively controls the output caching policies of an ASP.NET page or a user control contained
in a page.
Box 2: CacheDependency
CacheDependency establishes a dependency relationship between an item stored in an ASP.NET application’s
Cache object and a file, cache key, an array of either, or another CacheDependency object. The
CacheDependency class monitors the dependency relationships so that when any of them changes, the cached
item will be automatically removed.
Box 3: SqlCacheDependency
SQL cache dependency enables you to cache pages that are dependent on data from SQL Server tables. You
can configure SQL Server and ASP.NET tocache page requests, reducing server workload, until the data on
which the page depends has been updated in SQL Server. SQL cache dependency is useful for data such as
product catalogs or customer registration information that remains comparatively static.
outputCache CacheDependencyhttps://msdn.microsoft.com/en-us/library/system.web.caching.cachedependency(v=vs.110).aspx
first seems to be “Cookie”. OutputCache is caching the output from an action. server would not remember which user requested the dropdown/model.
Outputcache is a valid option, by setting output cache location to “Client” the output of the action is only cached on the client.
see http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/output-caching-in-mvc/
browser closed, how cache is still valid on Client’s side?
T1 should be Cookie.
I think it shoud be Cookie