# CalendarContract.CalendarCache

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# CalendarCache

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/provider/CalendarContract.CalendarCache "View this page in Java")  

```
class CalendarCache : CalendarContract.CalendarCacheColumns
```

|---|----------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                     ||
| ↳ | [android.provider.CalendarContract.CalendarCache](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#) |

CalendarCache stores some settings for calendar including the current time zone for the instances. These settings are stored using a key/value scheme. A[KEY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns#KEY:kotlin.String)must be specified when updating these values.

## Summary

|                                                                                                                                                                                                                                       Constants                                                                                                                                                                                                                                        ||
|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_TIMEZONE_INSTANCES](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_INSTANCES:kotlin.String) The key for updating the time zone used by the provider when it generates the instances table.                                                                                                                                   |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_TIMEZONE_INSTANCES_PREVIOUS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_INSTANCES_PREVIOUS:kotlin.String) The key for reading the last time zone set by the user.                                                                                                                                                        |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_TIMEZONE_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_TYPE:kotlin.String) They key for updating the use of auto/home time zones in Calendar.                                                                                                                                                                         |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [TIMEZONE_TYPE_AUTO](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#TIMEZONE_TYPE_AUTO:kotlin.String) The value to write to[KEY_TIMEZONE_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_TYPE:kotlin.String)if the provider should stay in sync with the device's time zone. |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [TIMEZONE_TYPE_HOME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#TIMEZONE_TYPE_HOME:kotlin.String) The value to write to[KEY_TIMEZONE_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_TYPE:kotlin.String)if the provider should use a fixed time zone set by the user.    |

| Inherited constants ||
|---|---|
| From class[CalendarCacheColumns](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns) |----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns#KEY:kotlin.String) <br /> The key for the setting. Keys are defined in[CalendarCache](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#). <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [VALUE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns#VALUE:kotlin.String) <br /> The value of the given setting. <br />                                                                                                                           | ||

|                                                                                                                                    Properties                                                                                                                                    ||
|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | [URI](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#URI:android.net.Uri) The URI to use for retrieving the properties from the Calendar db. |

## Constants

### KEY_TIMEZONE_INSTANCES

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_TIMEZONE_INSTANCES: String
```

The key for updating the time zone used by the provider when it generates the instances table. This should only be written if the type is set to[TIMEZONE_TYPE_HOME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#TIMEZONE_TYPE_HOME:kotlin.String). A valid time zone id should be written to this field.  

    Value: "timezoneInstances"

### KEY_TIMEZONE_INSTANCES_PREVIOUS

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_TIMEZONE_INSTANCES_PREVIOUS: String
```

The key for reading the last time zone set by the user. This should only be read by apps and it will be automatically updated whenever[KEY_TIMEZONE_INSTANCES](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_INSTANCES:kotlin.String)is updated with[TIMEZONE_TYPE_HOME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#TIMEZONE_TYPE_HOME:kotlin.String)set.  

    Value: "timezoneInstancesPrevious"

### KEY_TIMEZONE_TYPE

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_TIMEZONE_TYPE: String
```

They key for updating the use of auto/home time zones in Calendar. Valid values are[TIMEZONE_TYPE_AUTO](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#TIMEZONE_TYPE_AUTO:kotlin.String)or[TIMEZONE_TYPE_HOME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#TIMEZONE_TYPE_HOME:kotlin.String).  

    Value: "timezoneType"

### TIMEZONE_TYPE_AUTO

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val TIMEZONE_TYPE_AUTO: String
```

The value to write to[KEY_TIMEZONE_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_TYPE:kotlin.String)if the provider should stay in sync with the device's time zone.  

    Value: "auto"

### TIMEZONE_TYPE_HOME

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val TIMEZONE_TYPE_HOME: String
```

The value to write to[KEY_TIMEZONE_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarCache#KEY_TIMEZONE_TYPE:kotlin.String)if the provider should use a fixed time zone set by the user.  

    Value: "home"

## Properties

### URI

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val URI: Uri!
```

The URI to use for retrieving the properties from the Calendar db.