WPEWebKit.WebContext.set_cache_model

### Method

# WPEWebKit WebContextset_cache_model

#### Declaration [src]

    void
    webkit_web_context_set_cache_model (
      WebKitWebContext* context,
      WebKitCacheModel cache_model
    )

#### Description [src]

Specifies a usage model for WebViews.

Specifies a usage model for WebViews, which WebKit will use to determine its caching behavior. All web views follow the cache model. This cache model determines the RAM and disk space to use for caching previously viewed content .

Research indicates that users tend to browse within clusters of documents that hold resources in common, and to revisit previously visited documents. WebKit and the frameworks below it include built-in caches that take advantage of these patterns, substantially improving document load speed in browsing situations. The WebKit cache model controls the behaviors of all of these caches, including various WebCore caches.

Browsers can improve document load speed substantially by specifying `WEBKIT_CACHE_MODEL_WEB_BROWSER`. Applications without a browsing interface can reduce memory usage substantially by specifying `WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER`. The default value is `WEBKIT_CACHE_MODEL_WEB_BROWSER`.

#### Parameters

`cache_model`

  Type: `WebKitCacheModel`

  A `WebKitCacheModel`.