Enzo Server
  Quick Start
  Core Features
    Async Calls
    Edge Cache
    HTTP Access
  Advanced Capabilities
    Change Data Capture
    Configuration Settings
    Logins & ACL
    Current Executions
    Linked Server

  User Guides
     Sharding Overview


    All Adapters

    Create A Simple Adapter
    Best Practices
    Developer Guide
      Handler Columns
      Handler Options
      Handler Decorators
      Dynamic Columns
      Table & Table Enumerators
      Virtual Tables



Enzo Server allows you to create an Edge Cache, which copies data from remote locations to Enzo on a schedule.

Create an Edge Cache using SQL commands

All adapters that offer _async extensions support an edge cache. While Enzo Manager simplifies creating an edge cache, it may be preferable to use SQL in certain cases. Using SQL commands to create an edge cache requires creating a scheduled operation and provide a value for the snapshotName optional parameter.

EXEC [adapter].[handler]__asyncAt 'options' [,parameter1...]

See the Scheduling section for detailed information on the options parameter

Create an Edge Cache with Enzo Manager

Managing an edge cache through Enzo Manager requires first creating a view. Once a view is created, an edge cache can be created on the view. Because Enzo Manager requires views to be defined before creating an edge cache, only the adapters that support view definitions provide edge cache support. See Views for more information on how to create a view.

If you need to create an edge cache for an adapter that does not support views, use the SQL command approach.

To create an edge cache in Enzo Manager, select the adapter, click on the VIEWs tab and create/select a view, then choose the Snapshots tab. Existing edge caches on the view will be listed.

To create a new edge cache, click the NEW icon.

When creating a new edge cache, specify a name (the snapshotName), a schedule (the schedule dropdown allows you to specify a cron schedule manually), the start and end time of the refresh and whether you want to create the edge cache immediately (if not, it will be created at the next interval).

Click on Save to create the edge cache.


Create an Edge Cache refreshed every 5 minutes using SQL

The following code creates an edge cache with a 5 minute refresh rate, retrieves the cached data, and deletes it.

The code sample provided below runs directly against an Enzo Server.

-- This is the SQL command that returns data from SharePoint in real-time that we want to use as a cache
EXEC sharepoint.getlistitemsex 'US States', 'ID,Title,State Code,Created'

-- Let's run this call asynchronously every 5 minutes by adding __asyncAt and specify a snapshot name
EXEC sharepoint.getlistitemsex__asyncAt '0 0/5 * * * ?||||sUSStates', 'US States', 'ID,Title,State Code,Created'

-- Let's force execution of the background operation now:
EXEC sharepoint._asyncRefresh 'sUSStates'

-- wait a few seconds, and access the cached data set:
SELECT * FROM SharePoint.sUSStates

-- delete the cached data set and cancel any future scheduled operation:
exec SharePoint._asyncCancel 'sUSStates'