View Javadoc

1   package com.atlassian.vcache;
2   
3   import com.atlassian.annotations.PublicApi;
4   
5   /**
6    * Represents a request scope cache, which is intended to hold data for the life of a request.
7    * A request is a unit-of-work as managed by the host application. Examples may be be a web request,
8    * a scheduled job or a background task).
9    * <h1>Notes</h1>
10   * <ul>
11   * <li>{@code null} keys and values are <b>NOT</b> supported</li>
12   * <li>keys and values are stored by reference</li>
13   * <li>
14   * Data held in a request scope cache is cleared at the end of the request, and will
15   * never be accessible again. It is not possible to share a request scope cache across
16   * multiple requests (use a {@link JvmCache} or {@link ExternalCache} instead).
17   * </li>
18   * </ul>
19   *
20   * @param <K> the key type
21   * @param <V> the value type
22   * @since 1.0.0
23   */
24  @PublicApi
25  public interface RequestCache<K, V> extends VCache, LocalCacheOperations<K, V> {
26  }