001package com.box.sdk;
002
003/**
004 * Implement this interface to provide a custom access token cache implementation for your environment.
005 *
006 * <p>For production applications it is recommended to use a distributed cache like Memcached or Redis, and to
007 * implement this interface to store and retrieve access tokens appropriately for your environment.</p>
008 */
009public interface IAccessTokenCache {
010
011    /**
012     * Get the access token information from the cache.
013     * @param key       key to look for.
014     * @return          access token information.
015     */
016    String get(String key);
017
018    /**
019     * Store the access token information in the cache.
020     * @param key       key to use.
021     * @param value     access token information to store.
022     */
023    void put(String key, String value);
024}