openharmony 鸿蒙 arkts-apis-webview-BackForwardCacheOptions

2026-08-25 浏览 (1)

Class (BackForwardCacheOptions)

Implements a BackForwardCacheOptions object to set back-forward cache options of the Web component.

NOTE

  • The initial APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.

  • The initial APIs of this class are supported since API version 12.

  • The sample effect is subject to the actual device.

System capability: SystemCapability.Web.Webview.Core

Attributes

NameTypeRead-OnlyOptionalDescription
size12+numberNoNoThe maximum number of pages that can be cached in a Web component.
The default value is 1, and the maximum value is 50.
If this parameter is set to 0 or a negative value, the back-forward cache is disabled.
The Web component reclaims the cache for memory pressure.
timeToLive12+numberNoNoThe time that a Web component allows a page to stay in the back-forward cache.
If this parameter is set to 0 or a negative value, the back-forward cache is disabled.
Default value: 600
Unit: second

constructor12+

constructor()

Constructs a BackForwardCacheOptions object.

System capability: SystemCapability.Web.Webview.Core

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-webview-WebviewController

openharmony 鸿蒙 arkts-apis-webview-t

openharmony 鸿蒙 arkts-apis-webview

openharmony 鸿蒙 capi-arkweb-type-h

openharmony 鸿蒙 arkts-basic-components-web-FullScreenExitHandler

openharmony 鸿蒙 arkts-apis-webview-WebDownloadManager

openharmony 鸿蒙 arkts-basic-components-web-VerifyPinHandler

openharmony 鸿蒙 capi-web-arkweb-webmessage8h

openharmony 鸿蒙 arkts-apis-webview-NativeMediaPlayerHandler

openharmony 鸿蒙 capi-web-arkweb-proxymethodwithresult

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/gnl6sLgQ