
Text Cache
by Vass
Description
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.
Features
- Lightweight in-memory cache for Text values
- Can store up to 100.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.
textcacheget(key) Retrieve an entry from cache (returns null if not in cache). textcacheset(key, value, expireAfter, timeUnit, expirationPolicy) Set an entry in cache, if the key already exists the data will be updated. Expire after given ammount of time (seconds, minutes, hours, days). 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 plugin is not designed to store extremely large text values, caution is advised*
Changelog: Version 1.1.0
- Added textcachelifetime and textcachesize functions.
- Time unit can now be specified in textcacheset (seconds, minutes, hours, days).
- Increased cache max size from 10K to 100K.
- Hidden textcacheclear function to avoid clearing the cache by mistake.
- Bumped Appian SDK jar to 19.4.
Version 1.1.0
- Added textcachelifetime and textcachesize functions.
- Time unit can now be specified in textcacheset (seconds, minutes, hours, days).
- Increased cache max size from 10K to 100K.
- Hidden textcacheclear function to avoid clearing the cache by mistake.
- Bumped Appian SDK jar to 19.4.
Version 1.1.1
- Added textcachekeys: returns list of active keys.
- Fixed missing textcacheclear.
- Bumped Appian SDK jar to 20.2.
Release notes
- Added textcachekeys: returns list of active keys.
- Fixed missing textcacheclear
- Bumped Appian SDK jar to 20.2.
Version history (1)
1.1.0
- Added textcachelifetime and textcachesize functions.
- Time unit can now be specified in textcacheset (seconds, minutes, hours, days).
- Increased cache max size from 10K to 100K.
- Hidden textcacheclear function to avoid clearing the cache by mistake.
- Bumped Appian SDK jar to 19.4.