# Automatic Caching

DevFeed: [Automatic Caching](<https://devfeed.tech/articles/automatic-caching-19206.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/automatic-caching/>)

Author: Shai Almog

Published: 2016-12-14T00:00:00Z

Content type: release

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>)

Tags: [caching](<https://devfeed.tech/tags/caching.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [http](<https://devfeed.tech/tags/http.md>), [server](<https://devfeed.tech/tags/server.md>), [set](<https://devfeed.tech/tags/set.md>)

## AI overview

The article announces an experimental automatic caching feature for connection requests. It supports four caching modes--OFF, SMART, MANUAL, and OFFLINE--configurable globally or per request, and describes related cache retrieval, callbacks, and purging methods.

## Source excerpt

Caching server data locally is a huge part of the advantage a native app has over a web app. Normally this is non-trivial as it requires a delicate balance especially if you want to test the server resource for changes. HTTP provides two ways to do that the ETag and Last-Modified. While both are great they are non-trivial to use and by no definition seamless. We just added an experimental feature to connection request that allows you to set the caching mode to one of 4 states either globally or per connection request: