Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Cache Methods

Cache Methods are one-liners for the usage of cache on TORO Integrate. To view the javadocs go here

These are the different ways of using the cache methods:

Using Gloovy Step cache method gloovy step

Using Invoke Code Step cache method invoke step

Using Gloovy Step coder method gloovy step

Using Invoke Code Step coder method invoke step

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
//Put the value 9000 with "HAL" as key the in the "discovery" cache
"discovery1".cachePut( "HAL", 9000 )

//Retrieves a cached value based on the key the "HAL"
println "discovery1".cacheGet( "HAL" ) // value here would be 9000 

//Ivalidates "HAL"'s value from "discovery" cache
"discovery1".cacheInvalidate("HAL")

//So if we retrieve "HAL"'s value  again on the cache "discovery" 
println "discovery1".cacheGet( "HAL" ) // now prints null since "HAL"'s value has be invalidated