This post is a looong overdue follow-up of a sort to my previous post on the config API: The config API went through a major refactoring for the Ballerina 0.970.0 release. With the new type system which was introduced for the 0.970.0 version, retrieving configurations using the then API became cumbersome. There were instances where 5–10 line functions had to be written to read a single config value in the required data type (e.g., retrieving a port number as an integer). To address this, a new comprehensive API was introduced. …

Ballerina 0.970.0 introduced HTTP caching support. It does so by adding a caching layer on top of the plain HTTP client in Ballerina. The caching layer, complies with the RFC 7234 specification (it is not a complete implementation of the spec though). In addition to this, APIs are also provided for handling caching at the server side. In this post, we’ll take a look at the client side of caching using Ballerina 0.975.0.


  • Some familiarity with Ballerina language (syntax, services, endpoints). The Ballerina by Example page would be a good place to start.
  • HTTP caching (basic understanding of how it…

Edit: This post is now heavily out-of-date with the newer versions of Ballerina. Please refer to the following post for up-to-date info:

Ballerina has been around for a few months now. It has come a long way since its launch back in February, constantly tweaking, improving and adding things based on user feedback.

Ballerina strives to be configuration-free as much as possible in order to make it hassle free for the user. But inevitably, there will be instances where you need to be able to feed in configurations dynamically, rather than hard coding it. To address this we added…

Pubudu Fernando

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store