Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

New for Cache release 6.8, both the Cache Macro and the Future Macro support a retry capability. This is an advanced feature where the cache and future macros can react in a more useful manner when the rendering of the macro body indicates certain types of errors that are likely caused by a temporary condition with an underlying macro or external service. The goal is to make it more likely that meanful meaningful data will be is shown on the page at any point in time.

For example, the SQL macro may determine that a database is temporarily not available and indicate a retry is possible. In the case of the cache macro, it will attempt attempts to show previously cached data, if available, instead of showing the temporary error. Then, on the next render request, the rendering will be is retried. 

Related Issues

Jira Legacy
serverJIRA (bobswift.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
maximumIssues20
jqlQuerykey in (CACHE-130, CACHE-129, SQL-320)
serverId729d679a-302c-339f-958b-015e107badcd

...

Cache Macro

The Cache Macro will try to use uses previously cached data (that may be stale) if it is available instead of showing the error from the rendering. More importantly, the next request for the cache macro managed data will result results in a new request to render the macro body in the hope that the rendering will can be error free and return meaningful data. Without this support being enabled, the error rendering would have been shown until the cache expired.

...

Future Macro

The Future Macro will does not show the error data and, instead, will retry retries rendering the body after waiting a certain amount of time specified by the retryInterval parameter on the macro. The retryInterval parameter defaults to Default which recognizes a setting of an adminstrator controlled value that sets the number of seconds to wait. This means that the loading message will continue to show until good data is retrieved. 

The retry logic is controlled by the client page and stops as soon as the page is no longer being shown.

...

Use Both Future and Cache

A standard, recommended approach for improving the user experience and performance of access external data is to use the Cache Macro inside of a Future Macro. This approach works extremely well when both future and cache are enabled for the retry feature! The expected (error free) data will be is cached when it is available and automatically show on the page at that time.