Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Caching

This part of the examples package demonstrates how caching could be done in a Gloop Service using the exposed CacheMethods.

The service code/cachingDemo/CachedWeatherResponseDemo.gloop caches the current weather forecast provided by a mock weather service based on city/country combination, then gets deleted 10 seconds after its creation.

The service has been exposed as a REST API and can be accessed through the following URL.

1
http://localhost:8080/api/cached/mock-api/getCurrentWeather/{city}/{countryCode}

Tip

To edit the caching settings of the examples package open the file conf/caches.conf.