Product documentation and training for Shipcode.
Basic Action Nodes: Cache & Variable Management
These Nodes provide three distinct layers of data persistence within your application, each serving different use cases based on lifespan, scope, and access patterns.

These Nodes provide three distinct layers of data persistence within your application, each serving different use cases based on lifespan, scope, and access patterns.

Temporary Cache Storage

These Nodes provide short-term storage with optional expiration times, ideal for API response caching and computed values that don't need to persist beyond the current session.

  • Get Cache: Retrieves a value from the temporary cache storage layer.
  • Set Cache: Stores a value in the temporary cache storage layer with optional TTL expiration.

Environment Configuration

This Node accesses project-level configuration that varies across deployment environments.

Session State Management

These Nodes manage app-wide variables that persist across pages during the user's session, providing global state accessible from any Layout.

  • Get Global Variable: Reads app-wide variables that persist across pages for the user's session.
  • Set Global Variable: Sets or updates an app-wide variable that persists across pages for the user's session.

Set Cache

This Node stores a value in the temporary cache storage layer. Cached data is useful for reducing redundant API calls and storing computed values that are expensive to recalculate.


To configure Set Cache, select the Node on the Canvas and then open the Settings cog in the Right Sidebar.

  • Key: A unique identifier for the cached value. Use descriptive keys that indicate the data being cached (e.g., product-details-123 or user-preferences).
  • Value: The data to store in the cache. This can be a static value or data from previous Nodes in your Flow.
  • TTL (Time To Live): Optional expiration time in seconds. If provided, the cached value will automatically be removed after this duration. If omitted, the cache persists for the session duration.


Common Use Cases:

  • Caching API responses to avoid repeated network requests for the same data
  • Storing computed values that are expensive to recalculate
  • Implementing request deduplication for rapidly triggered Flows


💡💡💡 Tip 💡💡💡

Use descriptive cache keys that include identifiers when caching entity-specific data. For example, product-${productId} is more maintainable than generic keys like data1 or temp.

Get Cache

This Node retrieves a value previously stored using the Set Cache Node. If the cache key doesn't exist or has expired, the Node will return null.


To configure Get Cache, select the Node on the Canvas and then open the Settings cog in the Right Sidebar.

  • Key: The identifier used when the value was cached with Set Cache. The key must match exactly to retrieve the cached value.

Common Use Cases:

  • Checking if data is already cached before making an API request
  • Retrieving computed values to avoid recalculation
  • Implementing cache-first data loading patterns


📍📍📍 Note 📍📍📍

Get Cache returns null for missing or expired keys. Use a Conditional Node to check if the cached value exists before proceeding with cache-dependent logic.

Get Environment Variable

This Node reads project-level configuration variables that are defined in Project Settings and can differ across deployment environments (staging, production). Environment variables are ideal for storing configuration that changes between environments but remains constant within each environment.


To configure Get Environment Variable, select the Node on the Canvas and then open the Settings cog in the Right Sidebar.

  • Variable Name: The name of the environment variable to retrieve, as defined in Project Settings. Common examples include API_BASE_URL, API_KEY, or FEATURE_FLAG_ENABLED.


Common Use Cases:

  • Reading API base URLs that differ between staging and production
  • Accessing API keys or authentication tokens configured per environment
  • Checking feature flags to enable/disable functionality across environments


💡💡💡 Tip 💡💡💡

Use environment variables for any configuration that differs between staging and production. This prevents hardcoding environment-specific values in your Flows and makes deployment safer.

Set Global Variable

This Node sets or updates an app-wide variable that persists across pages for the duration of the user's session. Global variables are accessible from any Layout and any Flow within your application.


To configure Set Global Variable, select the Node on the Canvas and then open the Settings cog in the Right Sidebar.

  • Variable Name: A unique identifier for the global variable. Use descriptive names that indicate the data being stored (e.g., currentUser, cartItems, authToken).
  • Value: The data to store. This can be a static value or data from previous Nodes in your Flow.


Common Use Cases:

  • Storing user authentication state after login
  • Managing shopping cart data across multiple pages
  • Tracking application-wide UI state (e.g., sidebar open/closed)
  • Sharing data between different Flows without passing through Route parameters


📍📍📍 Note 📍📍📍

Global variables persist for the session duration but are cleared when the user closes the application. For data that needs to survive app restarts, use Set State with Persistent or Secure storage instead.

Get Global Variable

This Node retrieves an app-wide variable previously set using the Set Global Variable Node. Global variables can be accessed from any Layout or Flow within your application.


To configure Get Global Variable, select the Node on the Canvas and then open the Settings cog in the Right Sidebar.

  • Variable Name: The identifier used when the variable was set with Set Global Variable. The name must match exactly to retrieve the value.


Common Use Cases:

  • Retrieving user authentication state to check if user is logged in
  • Accessing shopping cart data to display item counts
  • Reading application-wide settings or preferences
  • Sharing state between disconnected Flows


💡💡💡 Tip 💡💡💡

Global variables are also accessible in Layouts through the GlobalState data source in FQL and data binding. This allows Components to reactively display global variable values without requiring a Flow.

Did this answer your question?