July 2016
Intermediate to advanced
150 pages
4h 24m
English
TorqueBox provides a built-in caching mechanism using the Infinispan data grid. Infinispan can work in a distributed cluster to replicate storage, but its distributed features are available only when deployed to a WildFly or EAP cluster. In non-clustered mode Infinispan’s cache still offers features such as eviction, expiration, persistence, and transactions that aren’t available in typical caching implementations.
You can easily demonstrate the TorqueBox cache in an IRB session. Run jirb in a terminal and execute the following commands in the new session:
| | jruby-9.0.5.0 :001 > require 'torquebox-caching' |
| | => true |
| | ... |
| | jruby-9.0.5.0 :002 > c = TorqueBox::Caching.cache("foo") |
| | => #<TorqueBox::Caching::Cache:0x7ee3d262 @cache={}, ... |
Read now
Unlock full access