1# Class (BackForwardCacheOptions) 2 3Implements a **BackForwardCacheOptions** object to set back-forward cache options of the **Web** component. 4 5> **NOTE** 6> 7> - 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. 8> 9> - The initial APIs of this class are supported since API version 12. 10> 11> - You can preview how this component looks on a real device, but not in DevEco Studio Previewer. 12 13**System capability**: SystemCapability.Web.Webview.Core 14 15## Attributes 16 17| Name| Type| Mandatory| Description| 18|------|------|------|------| 19| size<sup>12+</sup> | number | Yes| The maximum number of pages that can be cached in a **Web** component.<br>The default value is **1**, and the maximum value is **50**.<br>If this parameter is set to **0** or a negative value, the back-forward cache is disabled.<br>The **Web** component reclaims the cache for memory pressure.| 20| timeToLive<sup>12+</sup> | number | Yes| The time that a **Web** component allows a page to stay in the back-forward cache.<br>If this parameter is set to **0** or a negative value, the back-forward cache is disabled.<br>Default value: **600**<br>Unit: second| 21 22## constructor<sup>12+</sup> 23 24constructor() 25 26Constructs a **BackForwardCacheOptions** object. 27 28**System capability**: SystemCapability.Web.Webview.Core 29