== Cache configuration and policy
:description: Learn how to configure Bonita Portal cache and Living Application cache.

Learn how to configure Bonita Portal cache and Living Application cache.

Details about this cache configuration impact for the end user, and tutorial on modification of this configuration.

=== Cache policy over view

The default cache policy configured on your bonita bundle will allow your browser to store recently used information so that
it can be quickly accessed at a later time, thereby improving performance.
When you browse through different forms or custom pages that use the same images, CSS, or JavaScript, your browser will not have to re-download the files.
Instead, the browser can simply load them from the cache, which is stored on your local hard drive.

This cache policy will have impacts at three different levels:

* Bonita portal display time and look and feel update.
* Living applications display time and look and feel update.
* Mobile application display time and look and feel update.

Note that in every cases, custom pages and forms take advantage of the cache mechanism, whether contained in the portal,
 in an Application or in the Mobile application.

==== Development configuration

By default cache is disable for the web server embedded by Bonita studio, as it is more comfortable to realise development without cache.
But you can decide to activate cache, to be closer to the production display time. To do this,
see xref:bonita-bpm-studio-installation.adoc#enable_cache[Cache configuration] documentation.

[#portal_and_mobile]

==== Portal and Mobile

As the portal or mobile update frequency is specific for each users, cache duration is set to 10 hours by default. So if you update your bonita portal in production, or if you change the portal look and feel,
the end user will see the modification within a period of 10 hours.

To fit your needs, you can change this duration into your server configuration, by following those steps:

. Go in `workspace\tomcat\server\webapps\bonita\WEB-INF`
. Open `web.xml` file.
. Search `CacheFilter` filter-name.
. Change value for *duration* param to value what you want and *save file*.
. This update will be up when last cache expiration down or when end user empty cache browser.

== Living application and custom pages

As the pages generated by the UI Designer take advantage of a xref:live-update.adoc#cache-busting[cache busting] mechanism, we can set the
cache duration to 6 months.
To fit your needs, you can change this duration into your server configuration, by following those steps:

. Go in `workspace\tomcat\server\webapps\bonita\WEB-INF`
. Open `web.xml` file.
. Search `CustomPageCacheFilter` filter-name.
. Change value for *duration* param to value what you want and *save file*.
. This update will be up when last cache expiration down or when end user empty cache browser.

NOTE: Html resources will be not caching.
