# ApiMethodCacheControl

com.google.api.server.spi.config

## Annotation Type ApiMethodCacheControl

-

  *** ** * ** ***

  Deprecated. ApiMethodCacheControl is deprecated and will be removed in a future version of Cloud Endpoints.   

  ```
  @Retention(value=RUNTIME)
   @Target(value=METHOD)
   @Deprecated
  public @interface ApiMethodCacheControl
  ```
  Annotation for configuration of API method cache control.
-
  -

    ### Optional Element Summary

    | Modifier and Type | Optional Element and Description |
    |---|---|
    | `int` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiMethodCacheControl.html#maxAge--` Deprecated. Overrides the maximum age to cache responses from this method. |
    | `boolean` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiMethodCacheControl.html#noCache--` Deprecated. Disables caching of this method. |
    [Optional Elements]

-
  -

    ### Element Detail


    -

      #### noCache

      ```
      public abstract boolean noCache
      ```
      Deprecated. Disables caching of this method. The default value is true, so merely adding this annotation to your method config will disable caching for that method, unless you set this field to `false`.

      Default:
      :   true

  <!-- -->

  -

    -

      #### maxAge

      ```
      public abstract int maxAge
      ```
      Deprecated. Overrides the maximum age to cache responses from this method.

      Default:
      :   0