Documentation
Caching
To minimize network traffic biNu employs a technique of caching content on the client. With no caching, network traffic can be wasted, but with excessive caching the user may see out-of-date content. biNu automatically delivers the optimal balance. Whilst most aspects of biNu’s caching are automatic and invisible, it is useful for developers to understand how it works in order to:
- make decisions that further reduce network bandwidth
- optimise response times and improve the user experience
- assist in developing, testing and debugging their apps
If content is changed, biNu will re-execute a page and recreate relevant impressions. It will then compare the impressions to any versions that are already cached in the client and only send new content when it has changed. Also, the biNu Server compares the different components of the impression and only sends those components that have changed. Thus a change to a large page can result in a very small amount of data being sent to the client.
Note – when checking to see whether the content has changed (e.g has the actual text changed), biNu does not compare the formatting. Thus, changing the colour of a font will not be recognised as a change and will not be re-sent. Some formatting changes that alter the positioning of text, for example increasing the font size so the text is spread over more lines, may result in an update, but this should not be relied upon by the developer.
Immediate Display
If the biNu client has a cached version of an impression it will display the version in the cache, even if it has expired. However, it will immediately request a new version from the biNu Server. Often the server will report that the new version is the same as the old, but if it has changed the updates are uploaded and applied to a refreshed screen. Typically this happens in less than a second and the user may see little more than a quick flash on the handset.
Content expiry
If the user is already executing a page then the system will continue to use the current version, even if the page has expired. This ensures that the content is not constantly changing which can be confusing to the user. However, there are exceptions to this:
- When the user navigates away from a page then returns to it, biNu will check if the page has expired. However, if the user uses the ‘Back’ key to return to a page, biNu does not check whether it has expired.
- If the page is executed using server scrolling, and the user navigates to the start of the page (usually the top left corner) biNu will check if the page has expired.
- If PushUpdate is enabled, biNu will always ensure that the current content is maintained on the biNu client.
Shared Content and Time To Live (TTL)
To reduce load on application servers and optimise response times for users, biNu can download content from an application once and use it for many users. The content begins to expire when it is served from the app, not from when it is delivered to a biNu client. As a result, pages may be updated to a client in less time than the TTL. For example, if a page with a TTL of 10 minutes is downloaded for one user, and is then shared by a second user 7 minutes later, it will expire on the second client after just 3 minutes.