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    *
10   * <h1>Notes</h1>
11   * <ul>
12   *     <li>{@code null} keys and values are <b>NOT</b> supported</li>
13   *     <li>keys and values are stored by reference</li>
14   *     <li>
15   *         Data held in a request scope cache is cleared at the end of the request, and will
16   *         never be accessible again. It is not possible to share a request scope cache across
17   *         multiple requests (use a {@link JvmCache} or {@link ExternalCache} instead).
18   *     </li>
19   * </ul>
20   *
21   * @param <K> the key type
22   * @param <V> the value type
23   */
24  @PublicApi
25  public interface RequestCache<K, V> extends VCache, LocalCacheOperations<K, V>
26  {
27  }