Skip to main content
Skip table of contents

Results: Live, Cached, and Snapshot Modes

In some scenarios, you may need access to previously displayed data rather than real-time updates. To support this, PocketQuery now offers flexible options that let you control when a query is executed and how its results are loaded and displayed.

This is especially useful for reporting, historical analysis, and avoiding unnecessary data refreshes.

For example, consider a report titled "Users in Groups", which displays the number of users currently assigned to specific groups such as:

  • Sales

  • Marketing

  • Development

  • Finance

This report typically shows real-time membership counts for these groups. However, to analyze trends or compare data over time, it may be necessary to retain and review past versions of the report.

To determine how many users were in specific groups one year ago, you face a challenge: there is no timestamp associated with group memberships, and some users may have been removed from the system since then. As a result, it is not possible to filter the report based on historical membership data directly.

To support this, PocketQuery now offers flexible options that let you control when a query is executed and how its results are loaded and displayed.

Result Modes in PocketQuery

To solve this, PocketQuery provides three result modes in the Results tab of the Macro Editor:

Screen of the PocketQuery Results tab

Live (Default)

  • Queries run automatically when the page loads

  • Always shows the latest available data

  • Best for dashboards and up-to-date reports

Cached

  • Displays stored results instead of running the query automatically

  • Includes a Refresh button so you can manually update the data

  • Each refresh creates a new page version

  • Ideal for reducing query load while still allowing controlled updates

Snapshot

  • Stores the exact state of the results at a specific point in time

  • Queries do not run again when the page reloads

  • Best for historical reports and fixed reference data

Tip: Using Cached or Snapshot mode can help reduce loading times and avoid rate limits, especially on pages with many queries. Both keep your pages faster and more efficient.

Using Snapshot Mode for Historical Reports

Snapshot mode allows you to preserve the exact state of a report at a specific moment.

For example, if you create a snapshot of the “Users in Groups” report today, you can return to it months or years later and see exactly how many users were in each group at that time - even if memberships have changed or users have been removed.

How It Works

  1. Open the PocketQuery Macro Editor

  2. Go to the Results tab

  3. Select Snapshot

  4. Save the page

Once saved:

  • The report displays only the stored snapshot data

  • Reloading the page does not retrieve current data

  • The results remain fixed and unchanged

Once the snapshot is active, the report will display the data stored in the snapshot. Reloading the page will not retrieve current data from the source system. The report content remains fixed, matching the state when the snapshot was created.

Managing Multiple Snapshots

To maintain multiple snapshots of the same report over time, you can use one of the following methods:

Method 1: Multiple Macros on One Page

You can place multiple PocketQuery macros on a single page. Each macro will use the snapshot that was active when it was created, allowing you to create a historical overview on one page.

Example:
On a single “Users in Groups” page, you could have:

  • Macro 1 → Snapshot from January 2025

  • Macro 2 → Snapshot from April 2025

  • Macro 3 → Snapshot from July 2025

This lets you display a timeline of past data side by side, making trend analysis and comparisons easier for your readers.

Method 2: Multiple Pages

Create a separate Confluence page for each snapshot and include the date in the title.

Example:

  • Users in Groups – April 2025

  • Users in Groups – May 2025

This approach is ideal for clearly labeled, long-term archives.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.