Text Cache

Overview

Projects often make use of data which requires considerable time to obtain due to costly computations, network and database lag, and API calls pricing. Text Cache provides the functionality to temporarily store Text values in Appian for very low latency access. Expiration policies can be specified for each individual cache entry, allowing for flexible cache configurations. Experienced designers may utilize this plug-in in conjunction with Appian's internalize/externalize functions to directly cache queryEntity, queryProcessAnalytics or integration results.

Key Features & Functionality

  • Lightweight in-memory cache for Text values
  • Can store up to 10.000 entries.  Once the limit is reached old entries will be overwritten following the configured expiration policy:
    • Access: expires entries based on when they were last accessed
    • Create: expires entries based on when they were they were created
  • Data is compressed to minimize memory usage without impacting retrieval performance.

Functions:

  • textcacheget(key) Retrieve an entry from cache (returns null if not in cache)
  • textcacheset(key, value, expireAfter, expirationPolicy) Set an entry in cache, if the key already exists the data will be updated. Expire after given minutes (default 5)
  • textcacheremove(key) Removes an entry from cache
  • textcachelifetime(key) Expected expiration, in milliseconds from the current time, for a given key.
  • textcachesize() Number of entries in cache.

*This plug-in is not designed to store extremely large text values, caution is advised*

Anonymous
Parents Comment Children
  • Hi Robert, in a multi server environment each cache will have its own values, they are not in sync.

    In case of HA (as of Appian 21.1) there is single active app server running the plugins, so only in case of a failover will the cached data be lost, as the standby app server will not have any cached values.

    At the end of the day this is just a cache layer to speed up slow operations, it shouldn't be relied upon like a persistent store (for example an in memory DB).

    Hope i helps! 

    Cheers, Ricardo