# Enum ConnectionRequest.CachingMode

java.lang.Object
java.lang.Enum<ConnectionRequest.CachingMode>
com.codename1.io.ConnectionRequest.CachingMode

All Implemented Interfaces:
  `Comparable<ConnectionRequest.CachingMode>`

Enclosing class:
  `ConnectionRequest`

public static enum ConnectionRequest.CachingMode extends Enum<ConnectionRequest.CachingMode>

There are 5 caching modes:

- `OFF` is the default, meaning no caching.

- `SMART` means all get requests are cached intelligently and caching is "mostly" seamless.

- `MANUAL` means that the developer is responsible for the actual caching but the system will not do a request on a resource that's already "fresh".

- `OFFLINE` will fetch data from the cache and wont try to go to the server. It will generate a 404 error if data isn't available.

- `OFFLINE_FIRST` works the same way as offline but if data isn't available locally it will try to connect to the server.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `MANUAL`
  `OFF`
  `OFFLINE`
  `OFFLINE_FIRST`
  `SMART`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ConnectionRequest.CachingMode`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static ConnectionRequest.CachingMode[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### OFF

    public static final ConnectionRequest.CachingMode OFF

  - ### MANUAL

    public static final ConnectionRequest.CachingMode MANUAL

  - ### SMART

    public static final ConnectionRequest.CachingMode SMART

  - ### OFFLINE

    public static final ConnectionRequest.CachingMode OFFLINE

  - ### OFFLINE_FIRST

    public static final ConnectionRequest.CachingMode OFFLINE_FIRST

- ## Method Details

  - ### values

    public static ConnectionRequest.CachingMode[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static ConnectionRequest.CachingMode valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null