Davood
Davood

Reputation: 5645

How to cache a page on IIS and client?

i want to cache my page and use this type of caching

    [OutputCache(Duration = 21600, VaryByParam = "none")]
    public ActionResult Index()
    {
          //some codes
        return View();
    }

but i 'm confused this type of cache will stored on IIS or on client browser?

how can i cache my page on user browser not on the server?

Upvotes: 0

Views: 67

Answers (1)

Krzysztof Kalinowski
Krzysztof Kalinowski

Reputation: 1461

Default asp.net cache pages everywhere it can (server, proxy, client). You can change this by attribute

[Output(Location=OutputCacheLocation.Any)]

You can set the Location property to any one of the following values:

  • OutputCacheLocation·Any
  • OutputCacheLocation·Client
  • OutputCacheLocation.Downstream
  • OutputCacheLocation.Server
  • OutputCacheLocation.None
  • OutputCacheLocation.ServerAndClient

Upvotes: 1

Related Questions