다음을 통해 공유


Object Caching in SharePoint Server 2010 (ECM)

Applies to: SharePoint Server 2010

Microsoft SharePoint Server 2010 supports caching of certain page items, such as navigation data and data accessed through cross-list queries. Caching page items is fast and eliminates the need to retrieve field data from the database each time a page is rendered. The caching system caches complete field data for a page, excluding data for any Web Part controls on the page.

Caching for objects in a page can almost always be used. When users have a document checked out, the cache is bypassed.

Cross-List Query Caching

The cross-list query cache calls the site (SPWeb) and searches for items in one or more lists. The results of the query are cached, and data from multiple list sources is returned. Caching improves the query's performance.

The Content By Query Web Part (CQWP) uses cross-list query caching to improve its speed and performance. When you cache a cross-list query, no database round trip is required to retrieve results for a CQWP. You can use cross-list query caching across sites in a site collection, and the caching system retrieves and caches an optimum set of query results for each query. Additionally, the cache configuration includes enough metadata to dynamically trim for security each time a page is executed.

You can almost always cache results of a cross-list query. However, when a checked-out document is queried, data retrieved from that document bypasses the caching mechanism; that data is not cached until the document is checked in.

A cross-list query configuration is expressed in the form of a row multiplier. The query can be time-based or change-based.

Procedures

To configure the object cache

  1. On the Site Actions menu, point to Site Settings, and then click Modify All Site Settings.

  2. Under Site Collection Administration, click Site collection object cache.

  3. In the Object Cache Size section, type a value in the text box to specify the amount of memory (in megabytes) that you want the object cache to use.

  4. In the Cross List Query Cache Changes section, select one of the following options:

    • If your content changes frequently and you want to display the most accurate results possible, select Check the server for changes every time a cross list query runs.

    • On site collections where the improved performance you get from caching does not compromise the accuracy of the results, select Use the cached result of a cross list query for this many seconds and type the length of time in seconds to cache the results of the query.

  5. In the Cross List Query Results Multiplier section, type a number from 1 through 10 to use as a results multiplier.

    Type a larger number if your site collection has unique security permissions applied to many lists and sites. Type a smaller number if your site collection does not have unique permissions on each list or site. A smaller multiplier uses less memory per query.

  6. Click OK.

To flush the object cache

  1. On the Site Actions menu, point to Site Settings, and then click Modify All Site Settings.

  2. Under Site Collection Administration, click Site collection object cache.

  3. In the Object Cache Reset section, do one or more of the following:

    • To force the current server to flush its object cache, select the Object Cache Flush check box.

    • Select one or more check boxes. When you click OK, all entries in the object cache are flushed immediately.

    • If you do not select one or more check boxes, the object cache manages the expiration of items based on when they time-out or are changed in the site.

  4. Click OK.

See Also

Tasks

How to: Customize the SharePoint Content By Query Web Part by Using Custom Properties (ECM)

How to: Deploy Content Between Servers in SharePoint Server 2010 (ECM)

Concepts

Custom Caching Overview in SharePoint Server 2010 (ECM)

Output Caching and Cache Profiles in SharePoint Server 2010 (ECM)

Disk-Based Caching for Binary Large Objects in SharePoint Server 2010 (ECM)