# Storage Control V2 API - Class Google::Cloud::Storage::Control::V2::AnywhereCache (v1.12.0)

1.12.0 (latest) 1.11.0 1.10.1 1.9.0 1.8.1 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.1.1 Reference documentation and code samples for the Storage Control V2 API class Google::Cloud::Storage::Control::V2::AnywhereCache.

An Anywhere Cache Instance.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #admission_policy

    def admission_policy() -> ::String

**Returns**

- (::String) --- Cache admission policy. Valid policies includes: `admit-on-first-miss` and `admit-on-second-miss`. Defaults to `admit-on-first-miss`. Default value is applied if not specified in the create request.

### #admission_policy=

    def admission_policy=(value) -> ::String

**Parameter**

- **value** (::String) --- Cache admission policy. Valid policies includes: `admit-on-first-miss` and `admit-on-second-miss`. Defaults to `admit-on-first-miss`. Default value is applied if not specified in the create request.
**Returns**

- (::String) --- Cache admission policy. Valid policies includes: `admit-on-first-miss` and `admit-on-second-miss`. Defaults to `admit-on-first-miss`. Default value is applied if not specified in the create request.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage-control-v2/latest/Google-Protobuf-Timestamp)) --- Output only. Time when Anywhere cache instance is allocated.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Immutable. The resource name of this AnywhereCache. Format: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. The resource name of this AnywhereCache. Format: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
**Returns**

- (::String) --- Immutable. The resource name of this AnywhereCache. Format: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`

### #pending_update

    def pending_update() -> ::Boolean

**Returns**

- (::Boolean) --- Output only. True if there is an active update operation against this cache instance. Subsequential update requests will be rejected if this field is true. Output only.

### #state

    def state() -> ::String

**Returns**

- (::String) --- Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.

### #ttl

    def ttl() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage-control-v2/latest/Google-Protobuf-Duration)) --- Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

### #ttl=

    def ttl=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage-control-v2/latest/Google-Protobuf-Duration)) --- Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage-control-v2/latest/Google-Protobuf-Duration)) --- Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage-control-v2/latest/Google-Protobuf-Timestamp)) --- Output only. Time when Anywhere cache instance is last updated, including creation.

### #zone

    def zone() -> ::String

**Returns**

- (::String) --- Immutable. The zone in which the cache instance is running. For example, us-central1-a.

### #zone=

    def zone=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. The zone in which the cache instance is running. For example, us-central1-a.
**Returns**

- (::String) --- Immutable. The zone in which the cache instance is running. For example, us-central1-a.